! function(t, i) { "object" == typeof exports && "object" == typeof module ? module.exports = i() : "function" == typeof define && define.amd ? define("MahjongPhoenix_3W4kR", [], i) : "object" == typeof exports ? exports.MahjongPhoenix_3W4kR = i() : t.MahjongPhoenix_3W4kR = i() }(self, (() => (() => { var __webpack_modules__ = { 5182: (t, i, n) => { "use strict"; n.d(i, { FM: () => $, Il: () => G, JS: () => j, Kg: () => V, M8: () => W, Qe: () => y, RN: () => H, T: () => m, Ww: () => J, Xd: () => z, YK: () => w, YT: () => S, Yi: () => C, bq: () => v, cQ: () => X, mJ: () => _, o$: () => Y, sf: () => s }); var s, e, r = n(4936), h = n(4577), o = n(229), u = n(6480), a = n(5849), l = n(3767), c = n(2877), f = n(6335); (e = s || (s = {}))[e.Region = 0] = "Region", e[e.BoundingBox = 1] = "BoundingBox", e[e.Mesh = 2] = "Mesh", e[e.LinkedMesh = 3] = "LinkedMesh", e[e.Path = 4] = "Path", e[e.Point = 5] = "Point", e[e.Clipping = 6] = "Clipping"; var v, d, _, p, m, b, w, g, y, E, S = function() { function t(t, i, n, s) { void 0 === i && (i = new Array), void 0 === n && (n = 0), void 0 === s && (s = new DataView(t.buffer)), this.strings = i, this.index = n, this.buffer = s } return t.prototype.readByte = function() { return this.buffer.getInt8(this.index++) }, t.prototype.readUnsignedByte = function() { return this.buffer.getUint8(this.index++) }, t.prototype.readShort = function() { var t = this.buffer.getInt16(this.index); return this.index += 2, t }, t.prototype.readInt32 = function() { var t = this.buffer.getInt32(this.index); return this.index += 4, t }, t.prototype.readInt = function(t) { var i = this.readByte(), n = 127 & i; return 0 != (128 & i) && (n |= (127 & (i = this.readByte())) << 7, 0 != (128 & i) && (n |= (127 & (i = this.readByte())) << 14, 0 != (128 & i) && (n |= (127 & (i = this.readByte())) << 21, 0 != (128 & i) && (n |= (127 & (i = this.readByte())) << 28)))), t ? n : n >>> 1 ^ -(1 & n) }, t.prototype.readStringRef = function() { var t = this.readInt(!0); return 0 == t ? null : this.strings[t - 1] }, t.prototype.readString = function() { var t = this.readInt(!0); switch (t) { case 0: return null; case 1: return "" } t--; for (var i = "", n = 0; n < t;) { var s = this.readUnsignedByte(); switch (s >> 4) { case 12: case 13: i += String.fromCharCode((31 & s) << 6 | 63 & this.readByte()), n += 2; break; case 14: i += String.fromCharCode((15 & s) << 12 | (63 & this.readByte()) << 6 | 63 & this.readByte()), n += 3; break; default: i += String.fromCharCode(s), n++ } } return i }, t.prototype.readFloat = function() { var t = this.buffer.getFloat32(this.index); return this.index += 4, t }, t.prototype.readBoolean = function() { return 0 != this.readByte() }, t }(); (d = v || (v = {}))[d.setup = 0] = "setup", d[d.first = 1] = "first", d[d.replace = 2] = "replace", d[d.add = 3] = "add", (p = _ || (_ = {}))[p.mixIn = 0] = "mixIn", p[p.mixOut = 1] = "mixOut", (b = m || (m = {}))[b.Fixed = 0] = "Fixed", b[b.Percent = 1] = "Percent", (g = w || (w = {}))[g.Tangent = 0] = "Tangent", g[g.Chain = 1] = "Chain", g[g.ChainScale = 2] = "ChainScale", (E = y || (y = {}))[E.Normal = 0] = "Normal", E[E.OnlyTranslation = 1] = "OnlyTranslation", E[E.NoRotationOrReflection = 2] = "NoRotationOrReflection", E[E.NoScale = 3] = "NoScale", E[E.NoScaleOrReflection = 4] = "NoScaleOrReflection"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var A, T, M, O, I = function(t, i) { return (I = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]) })(t, i) }; function N(t, i) { if ("function" != typeof i && null !== i) throw new TypeError("Class extends value " + String(i) + " is not a constructor or null"); function n() { this.constructor = t } I(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) } function R(t) { switch (t.toLowerCase()) { case "nearest": return A.Nearest; case "linear": return A.Linear; case "mipmap": return A.MipMap; case "mipmapnearestnearest": return A.MipMapNearestNearest; case "mipmaplinearnearest": return A.MipMapLinearNearest; case "mipmapnearestlinear": return A.MipMapNearestLinear; case "mipmaplinearlinear": return A.MipMapLinearLinear; default: throw new Error("Unknown texture filter " + t) } }(T = A || (A = {}))[T.Nearest = 9728] = "Nearest", T[T.Linear = 9729] = "Linear", T[T.MipMap = 9987] = "MipMap", T[T.MipMapNearestNearest = 9984] = "MipMapNearestNearest", T[T.MipMapLinearNearest = 9985] = "MipMapLinearNearest", T[T.MipMapNearestLinear = 9986] = "MipMapNearestLinear", T[T.MipMapLinearLinear = 9987] = "MipMapLinearLinear", (O = M || (M = {}))[O.MirroredRepeat = 33648] = "MirroredRepeat", O[O.ClampToEdge = 33071] = "ClampToEdge", O[O.Repeat = 10497] = "Repeat"; var P, x = function() { function t() { this.size = null, this.names = null, this.values = null, this.renderObject = null } return Object.defineProperty(t.prototype, "width", { get: function() { var t = this.texture; return t.trim ? t.trim.width : t.orig.width }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "height", { get: function() { var t = this.texture; return t.trim ? t.trim.height : t.orig.height }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "u", { get: function() { return this.texture._.x0 }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "v", { get: function() { return this.texture._.y0 }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "u2", { get: function() { return this.texture._.x2 }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "v2", { get: function() { return this.texture._.y2 }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "offsetX", { get: function() { var t = this.texture; return t.trim ? t.trim.x : 0 }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "offsetY", { get: function() { return this.spineOffsetY }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "pixiOffsetY", { get: function() { var t = this.texture; return t.trim ? t.trim.y : 0 }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "spineOffsetY", { get: function() { var t = this.texture; return this.originalHeight - this.height - (t.trim ? t.trim.y : 0) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "originalWidth", { get: function() { return this.texture.orig.width }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "originalHeight", { get: function() { return this.texture.orig.height }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "x", { get: function() { return this.texture.frame.x }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "y", { get: function() { return this.texture.frame.y }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "rotate", { get: function() { return 0 !== this.texture.rotate }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "degrees", { get: function() { return (360 - 45 * this.texture.rotate) % 360 }, enumerable: !1, configurable: !0 }), t }(), L = function() { this.x = 0, this.y = 0, this.width = 0, this.height = 0, this.offsetX = 0, this.offsetY = 0, this.originalWidth = 0, this.originalHeight = 0, this.rotate = 0, this.index = 0 }, C = function() { function t(t, i, n) { this.pages = new Array, this.regions = new Array, t && this.addSpineAtlas(t, i, n) } return t.prototype.addTexture = function(t, i) { for (var n = this.pages, s = null, e = 0; e < n.length; e++) if (n[e].baseTexture === i.baseTexture) { s = n[e]; break } if (null === s) { (s = new k).name = "texturePage"; var r = i.baseTexture; s.width = r.realWidth, s.height = r.realHeight, s.baseTexture = r, s.minFilter = s.magFilter = A.Nearest, s.uWrap = M.ClampToEdge, s.vWrap = M.ClampToEdge, n.push(s) } var h = new F; return h.name = t, h.page = s, h.texture = i, h.index = -1, this.regions.push(h), h }, t.prototype.addTextureHash = function(t, i) { for (var n in t) t.hasOwnProperty(n) && this.addTexture(i && -1 !== n.indexOf(".") ? n.substr(0, n.lastIndexOf(".")) : n, t[n]) }, t.prototype.addSpineAtlas = function(t, i, n) { return this.load(t, i, n) }, t.prototype.load = function(t, i, n) { var s = this; if (null == i) throw new Error("textureLoader cannot be null."); var e = new U(t), u = new Array(4), a = null, l = {}, c = null; l.size = function() { a.width = parseInt(u[1]), a.height = parseInt(u[2]) }, l.format = function() {}, l.filter = function() { a.minFilter = R(u[1]), a.magFilter = R(u[2]) }, l.repeat = function() { -1 != u[1].indexOf("x") && (a.uWrap = M.Repeat), -1 != u[1].indexOf("y") && (a.vWrap = M.Repeat) }, l.pma = function() { a.pma = "true" == u[1] }; for (var f = { xy: function() { c.x = parseInt(u[1]), c.y = parseInt(u[2]) }, size: function() { c.width = parseInt(u[1]), c.height = parseInt(u[2]) }, bounds: function() { c.x = parseInt(u[1]), c.y = parseInt(u[2]), c.width = parseInt(u[3]), c.height = parseInt(u[4]) }, offset: function() { c.offsetX = parseInt(u[1]), c.offsetY = parseInt(u[2]) }, orig: function() { c.originalWidth = parseInt(u[1]), c.originalHeight = parseInt(u[2]) }, offsets: function() { c.offsetX = parseInt(u[1]), c.offsetY = parseInt(u[2]), c.originalWidth = parseInt(u[3]), c.originalHeight = parseInt(u[4]) }, rotate: function() { var t = u[1], i = 0; i = "true" == t.toLocaleLowerCase() ? 6 : "false" == t.toLocaleLowerCase() ? 0 : (720 - parseFloat(t)) % 360 / 45, c.rotate = i }, index: function() { c.index = parseInt(u[1]) } }, v = e.readLine(); null != v && 0 == v.trim().length;) v = e.readLine(); for (; null != v && 0 != v.trim().length && 0 != e.readEntry(u, v);) v = e.readLine(); var d = function() { for (;;) { if (null == v) return n && n(s); if (0 == v.trim().length) a = null, v = e.readLine(); else { if (null === a) { for ((a = new k).name = v.trim(); 0 != e.readEntry(u, v = e.readLine());) { (m = l[u[0]]) && m() } s.pages.push(a), i(a.name, (function(t) { if (null === t) return s.pages.splice(s.pages.indexOf(a), 1), n && n(null); a.baseTexture = t, a.pma && (t.alphaMode = r.iw.PMA), t.valid || t.setSize(a.width, a.height), a.setFilters(), a.width && a.height || (a.width = t.realWidth, a.height = t.realHeight), d() })); break } c = new L; var t = new F; t.name = v, t.page = a; for (var _ = null, p = null;;) { var m, b = e.readEntry(u, v = e.readLine()); if (0 == b) break; if (m = f[u[0]]) m(); else { null == _ && (_ = [], p = []), _.push(u[0]); for (var w = [], g = 0; g < b; g++) w.push(parseInt(u[g + 1])); p.push(w) } } 0 == c.originalWidth && 0 == c.originalHeight && (c.originalWidth = c.width, c.originalHeight = c.height); var y = a.baseTexture.resolution; c.x /= y, c.y /= y, c.width /= y, c.height /= y, c.originalWidth /= y, c.originalHeight /= y, c.offsetX /= y, c.offsetY /= y; var E = c.rotate % 4 != 0, S = new o.Ae(c.x, c.y, E ? c.height : c.width, E ? c.width : c.height), A = new o.Ae(0, 0, c.originalWidth, c.originalHeight), T = new o.Ae(c.offsetX, c.originalHeight - c.height - c.offsetY, c.width, c.height); t.texture = new h.xE(t.page.baseTexture, S, A, T, c.rotate), t.index = c.index, t.texture.updateUvs(), s.regions.push(t) } } }; d() }, t.prototype.findRegion = function(t) { for (var i = 0; i < this.regions.length; i++) if (this.regions[i].name == t) return this.regions[i]; return null }, t.prototype.dispose = function() { for (var t = 0; t < this.pages.length; t++) this.pages[t].baseTexture.dispose() }, t }(), U = function() { function t(t) { this.index = 0, this.lines = t.split(/\r\n|\r|\n/) } return t.prototype.readLine = function() { return this.index >= this.lines.length ? null : this.lines[this.index++] }, t.prototype.readEntry = function(t, i) { if (null == i) return 0; if (0 == (i = i.trim()).length) return 0; var n = i.indexOf(":"); if (-1 == n) return 0; t[0] = i.substr(0, n).trim(); for (var s = 1, e = n + 1;; s++) { var r = i.indexOf(",", e); if (-1 == r) return t[s] = i.substr(e).trim(), s; if (t[s] = i.substr(e, r - e).trim(), e = r + 1, 4 == s) return 4 } }, t }(), k = function() { function t() { this.minFilter = A.Nearest, this.magFilter = A.Nearest, this.uWrap = M.ClampToEdge, this.vWrap = M.ClampToEdge } return t.prototype.setFilters = function() { var t = this.baseTexture, i = this.minFilter; i == A.Linear ? t.scaleMode = r.aH.LINEAR : this.minFilter == A.Nearest ? t.scaleMode = r.aH.NEAREST : (t.mipmap = r.WB.POW2, t.scaleMode = i == A.MipMapNearestNearest ? r.aH.NEAREST : r.aH.LINEAR) }, t }(), F = function(t) { function i() { return null !== t && t.apply(this, arguments) || this } return N(i, t), i }(x), B = (P = new Float32Array(1), function(t) { return P[0] = t, P[0] }), D = Math.fround || B, j = function() { function t() { this.array = new Array } return t.prototype.add = function(t) { var i = this.contains(t); return this.array[0 | t] = 0 | t, !i }, t.prototype.contains = function(t) { return null != this.array[0 | t] }, t.prototype.remove = function(t) { this.array[0 | t] = void 0 }, t.prototype.clear = function() { this.array.length = 0 }, t }(), G = (function() { function t() { this.entries = {}, this.size = 0 } t.prototype.add = function(t) { var i = this.entries[t]; return this.entries[t] = !0, !i && (this.size++, !0) }, t.prototype.addAll = function(t) { for (var i = this.size, n = 0, s = t.length; n < s; n++) this.add(t[n]); return i != this.size }, t.prototype.contains = function(t) { return this.entries[t] }, t.prototype.clear = function() { this.entries = {}, this.size = 0 } }(), function() { function t(t, i, n, s) { void 0 === t && (t = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === s && (s = 0), this.r = t, this.g = i, this.b = n, this.a = s } return t.prototype.set = function(t, i, n, s) { return this.r = t, this.g = i, this.b = n, this.a = s, this.clamp() }, t.prototype.setFromColor = function(t) { return this.r = t.r, this.g = t.g, this.b = t.b, this.a = t.a, this }, t.prototype.setFromString = function(t) { return t = "#" == t.charAt(0) ? t.substr(1) : t, this.r = parseInt(t.substr(0, 2), 16) / 255, this.g = parseInt(t.substr(2, 2), 16) / 255, this.b = parseInt(t.substr(4, 2), 16) / 255, this.a = 8 != t.length ? 1 : parseInt(t.substr(6, 2), 16) / 255, this }, t.prototype.add = function(t, i, n, s) { return this.r += t, this.g += i, this.b += n, this.a += s, this.clamp() }, t.prototype.clamp = function() { return this.r < 0 ? this.r = 0 : this.r > 1 && (this.r = 1), this.g < 0 ? this.g = 0 : this.g > 1 && (this.g = 1), this.b < 0 ? this.b = 0 : this.b > 1 && (this.b = 1), this.a < 0 ? this.a = 0 : this.a > 1 && (this.a = 1), this }, t.rgba8888ToColor = function(t, i) { t.r = ((4278190080 & i) >>> 24) / 255, t.g = ((16711680 & i) >>> 16) / 255, t.b = ((65280 & i) >>> 8) / 255, t.a = (255 & i) / 255 }, t.rgb888ToColor = function(t, i) { t.r = ((16711680 & i) >>> 16) / 255, t.g = ((65280 & i) >>> 8) / 255, t.b = (255 & i) / 255 }, t.fromString = function(i) { return (new t).setFromString(i) }, t.WHITE = new t(1, 1, 1, 1), t.RED = new t(1, 0, 0, 1), t.GREEN = new t(0, 1, 0, 1), t.BLUE = new t(0, 0, 1, 1), t.MAGENTA = new t(1, 0, 1, 1), t }()), W = function() { function t() {} return t.clamp = function(t, i, n) { return t < i ? i : t > n ? n : t }, t.cosDeg = function(i) { return Math.cos(i * t.degRad) }, t.sinDeg = function(i) { return Math.sin(i * t.degRad) }, t.signum = function(t) { return t > 0 ? 1 : t < 0 ? -1 : 0 }, t.toInt = function(t) { return t > 0 ? Math.floor(t) : Math.ceil(t) }, t.cbrt = function(t) { var i = Math.pow(Math.abs(t), 1 / 3); return t < 0 ? -i : i }, t.randomTriangular = function(i, n) { return t.randomTriangularWith(i, n, .5 * (i + n)) }, t.randomTriangularWith = function(t, i, n) { var s = Math.random(), e = i - t; return s <= (n - t) / e ? t + Math.sqrt(s * e * (n - t)) : i - Math.sqrt((1 - s) * e * (i - n)) }, t.isPowerOfTwo = function(t) { return t && 0 == (t & t - 1) }, t.PI2 = 2 * (t.PI = 3.1415927), t.radDeg = t.radiansToDegrees = 180 / t.PI, t.degRad = t.degreesToRadians = t.PI / 180, t }(), H = function(t) { function i(i) { return t.call(this, i) || this } return N(i, t), i.prototype.applyInternal = function(t) { return Math.pow(t - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1 }, i }(function(t) { function i(i) { var n = t.call(this) || this; return n.power = 2, n.power = i, n } return N(i, t), i.prototype.applyInternal = function(t) { return t <= .5 ? Math.pow(2 * t, this.power) / 2 : Math.pow(2 * (t - 1), this.power) / (this.power % 2 == 0 ? -2 : 2) + 1 }, i }(function() { function t() {} return t.prototype.apply = function(t, i, n) { return t + (i - t) * this.applyInternal(n) }, t }())), X = function() { function t() {} return t.arrayCopy = function(t, i, n, s, e) { for (var r = i, h = s; r < i + e; r++, h++) n[h] = t[r] }, t.arrayFill = function(t, i, n, s) { for (var e = i; e < n; e++) t[e] = s }, t.setArraySize = function(t, i, n) { void 0 === n && (n = 0); var s = t.length; if (s == i) return t; if (t.length = i, s < i) for (var e = s; e < i; e++) t[e] = n; return t }, t.ensureArrayCapacity = function(i, n, s) { return void 0 === s && (s = 0), i.length >= n ? i : t.setArraySize(i, n, s) }, t.newArray = function(t, i) { for (var n = new Array(t), s = 0; s < t; s++) n[s] = i; return n }, t.newFloatArray = function(i) { if (t.SUPPORTS_TYPED_ARRAYS) return new Float32Array(i); for (var n = new Array(i), s = 0; s < n.length; s++) n[s] = 0; return n }, t.newShortArray = function(i) { if (t.SUPPORTS_TYPED_ARRAYS) return new Int16Array(i); for (var n = new Array(i), s = 0; s < n.length; s++) n[s] = 0; return n }, t.toFloatArray = function(i) { return t.SUPPORTS_TYPED_ARRAYS ? new Float32Array(i) : i }, t.toSinglePrecision = function(i) { return t.SUPPORTS_TYPED_ARRAYS ? D(i) : i }, t.webkit602BugfixHelper = function(t, i) {}, t.contains = function(t, i, n) { for (var s = 0; s < t.length; s++) if (t[s] == i) return !0; return !1 }, t.enumValue = function(t, i) { return t[i[0].toUpperCase() + i.slice(1)] }, t.SUPPORTS_TYPED_ARRAYS = "undefined" != typeof Float32Array, t }(), V = (function() { function t() {} t.logBones = function(t) { for (var i = 0; i < t.bones.length; i++); } }(), function() { function t(t) { this.items = new Array, this.instantiator = t } return t.prototype.obtain = function() { return this.items.length > 0 ? this.items.pop() : this.instantiator() }, t.prototype.free = function(t) { t.reset && t.reset(), this.items.push(t) }, t.prototype.freeAll = function(t) { for (var i = 0; i < t.length; i++) this.free(t[i]) }, t.prototype.clear = function() { this.items.length = 0 }, t }()), $ = function() { function t(t, i) { void 0 === t && (t = 0), void 0 === i && (i = 0), this.x = t, this.y = i } return t.prototype.set = function(t, i) { return this.x = t, this.y = i, this }, t.prototype.length = function() { var t = this.x, i = this.y; return Math.sqrt(t * t + i * i) }, t.prototype.normalize = function() { var t = this.length(); return 0 != t && (this.x /= t, this.y /= t), this }, t }(), Y = (function() { function t() { this.maxDelta = .064, this.framesPerSecond = 0, this.delta = 0, this.totalTime = 0, this.lastTime = Date.now() / 1e3, this.frameCount = 0, this.frameTime = 0 } t.prototype.update = function() { var t = Date.now() / 1e3; this.delta = t - this.lastTime, this.frameTime += this.delta, this.totalTime += this.delta, this.delta > this.maxDelta && (this.delta = this.maxDelta), this.lastTime = t, this.frameCount++, this.frameTime > 1 && (this.framesPerSecond = this.frameCount / this.frameTime, this.frameTime = 0, this.frameCount = 0) } }(), function() { function t(t) { void 0 === t && (t = 32), this.addedValues = 0, this.lastValue = 0, this.mean = 0, this.dirty = !0, this.values = new Array(t) } t.prototype.hasEnoughData = function() { return this.addedValues >= this.values.length }, t.prototype.addValue = function(t) { this.addedValues < this.values.length && this.addedValues++, this.values[this.lastValue++] = t, this.lastValue > this.values.length - 1 && (this.lastValue = 0), this.dirty = !0 }, t.prototype.getMean = function() { if (this.hasEnoughData()) { if (this.dirty) { for (var t = 0, i = 0; i < this.values.length; i++) t += this.values[i]; this.mean = t / this.values.length, this.dirty = !1 } return this.mean } return 0 } }(), function() { function t() { this.minX = 0, this.minY = 0, this.maxX = 0, this.maxY = 0, this.boundingBoxes = new Array, this.polygons = new Array, this.polygonPool = new V((function() { return X.newFloatArray(16) })) } return t.prototype.update = function(t, i) { if (!t) throw new Error("skeleton cannot be null."); var n = this.boundingBoxes, e = this.polygons, r = this.polygonPool, h = t.slots, o = h.length; n.length = 0, r.freeAll(e), e.length = 0; for (var u = 0; u < o; u++) { var a = h[u]; if (a.bone.active) { var l = a.getAttachment(); if (null != l && l.type === s.BoundingBox) { var c = l; n.push(c); var f = r.obtain(); f.length != c.worldVerticesLength && (f = X.newFloatArray(c.worldVerticesLength)), e.push(f), c.computeWorldVertices(a, 0, c.worldVerticesLength, f, 0, 2) } } } i ? this.aabbCompute() : (this.minX = Number.POSITIVE_INFINITY, this.minY = Number.POSITIVE_INFINITY, this.maxX = Number.NEGATIVE_INFINITY, this.maxY = Number.NEGATIVE_INFINITY) }, t.prototype.aabbCompute = function() { for (var t = Number.POSITIVE_INFINITY, i = Number.POSITIVE_INFINITY, n = Number.NEGATIVE_INFINITY, s = Number.NEGATIVE_INFINITY, e = this.polygons, r = 0, h = e.length; r < h; r++) for (var o = e[r], u = o, a = 0, l = o.length; a < l; a += 2) { var c = u[a], f = u[a + 1]; t = Math.min(t, c), i = Math.min(i, f), n = Math.max(n, c), s = Math.max(s, f) } this.minX = t, this.minY = i, this.maxX = n, this.maxY = s }, t.prototype.aabbContainsPoint = function(t, i) { return t >= this.minX && t <= this.maxX && i >= this.minY && i <= this.maxY }, t.prototype.aabbIntersectsSegment = function(t, i, n, s) { var e = this.minX, r = this.minY, h = this.maxX, o = this.maxY; if (t <= e && n <= e || i <= r && s <= r || t >= h && n >= h || i >= o && s >= o) return !1; var u = (s - i) / (n - t), a = u * (e - t) + i; if (a > r && a < o) return !0; if ((a = u * (h - t) + i) > r && a < o) return !0; var l = (r - i) / u + t; return l > e && l < h || (l = (o - i) / u + t) > e && l < h }, t.prototype.aabbIntersectsSkeleton = function(t) { return this.minX < t.maxX && this.maxX > t.minX && this.minY < t.maxY && this.maxY > t.minY }, t.prototype.containsPoint = function(t, i) { for (var n = this.polygons, s = 0, e = n.length; s < e; s++) if (this.containsPointPolygon(n[s], t, i)) return this.boundingBoxes[s]; return null }, t.prototype.containsPointPolygon = function(t, i, n) { for (var s = t, e = t.length, r = e - 2, h = !1, o = 0; o < e; o += 2) { var u = s[o + 1], a = s[r + 1]; if (u < n && a >= n || a < n && u >= n) { var l = s[o]; l + (n - u) / (a - u) * (s[r] - l) < i && (h = !h) } r = o } return h }, t.prototype.intersectsSegment = function(t, i, n, s) { for (var e = this.polygons, r = 0, h = e.length; r < h; r++) if (this.intersectsSegmentPolygon(e[r], t, i, n, s)) return this.boundingBoxes[r]; return null }, t.prototype.intersectsSegmentPolygon = function(t, i, n, s, e) { for (var r = t, h = t.length, o = i - s, u = n - e, a = i * e - n * s, l = r[h - 2], c = r[h - 1], f = 0; f < h; f += 2) { var v = r[f], d = r[f + 1], _ = l * d - c * v, p = l - v, m = c - d, b = o * m - u * p, w = (a * p - o * _) / b; if ((w >= l && w <= v || w >= v && w <= l) && (w >= i && w <= s || w >= s && w <= i)) { var g = (a * m - u * _) / b; if ((g >= c && g <= d || g >= d && g <= c) && (g >= n && g <= e || g >= e && g <= n)) return !0 } l = v, c = d } return !1 }, t.prototype.getPolygon = function(t) { if (!t) throw new Error("boundingBox cannot be null."); var i = this.boundingBoxes.indexOf(t); return -1 == i ? null : this.polygons[i] }, t.prototype.getWidth = function() { return this.maxX - this.minX }, t.prototype.getHeight = function() { return this.maxY - this.minY }, t }()), z = { yDown: !0, FAIL_ON_NON_EXISTING_SKIN: !1, GLOBAL_AUTO_UPDATE: !0, GLOBAL_DELAY_LIMIT: 0 }, K = [0, 0, 0], q = function(t) { function i() { var i = null !== t && t.apply(this, arguments) || this; return i.region = null, i.attachment = null, i } return N(i, t), i }(a.j), Z = function(t) { function i(i, n, s, e, r) { var h = t.call(this, i, n, s, e, r) || this; return h.region = null, h.attachment = null, h } return N(i, t), i }(l.AL), J = function(t) { function i(i) { var n = t.call(this) || this; if (!i) throw new Error("The spineData param is required."); if ("string" == typeof i) throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.'); n.spineData = i, n.createSkeleton(i), n.slotContainers = [], n.tempClipContainers = []; for (var e = 0, r = n.skeleton.slots.length; e < r; e++) { var h = n.skeleton.slots[e], o = h.getAttachment(), u = n.newContainer(); if (n.slotContainers.push(u), n.addChild(u), n.tempClipContainers.push(null), o) if (o.type === s.Region) { var a = o.name, l = n.createSprite(h, o, a); h.currentSprite = l, h.currentSpriteName = a, u.addChild(l) } else if (o.type === s.Mesh) { var c = n.createMesh(h, o); h.currentMesh = c, h.currentMeshId = o.id, h.currentMeshName = o.name, u.addChild(c) } else o.type === s.Clipping && (n.createGraphics(h, o), u.addChild(h.clippingContainer), u.addChild(h.currentGraphics)) } return n.tintRgb = new Float32Array([1, 1, 1]), n.autoUpdate = !0, n.visible = !0, n } return N(i, t), Object.defineProperty(i.prototype, "debug", { get: function() { return this.O }, set: function(t) { var i; t != this.O && (null === (i = this.O) || void 0 === i || i.unregisterSpine(this), null == t || t.registerSpine(this), this.O = t) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "autoUpdate", { get: function() { return this.I }, set: function(t) { t !== this.I && (this.I = t, this.updateTransform = t ? i.prototype.autoUpdateTransform : u.W2.prototype.updateTransform) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "tint", { get: function() { return (0, f.rgb2hex)(this.tintRgb) }, set: function(t) { this.tintRgb = (0, f.hex2rgb)(t, this.tintRgb) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "delayLimit", { get: function() { return (void 0 !== this.localDelayLimit ? this.localDelayLimit : z.GLOBAL_DELAY_LIMIT) || Number.MAX_VALUE }, enumerable: !1, configurable: !0 }), i.prototype.update = function(t) { var i, n = this.delayLimit; if (t > n && (t = n), this.state.update(t), this.state.apply(this.skeleton), this.skeleton) { this.skeleton.updateWorldTransform(); var e = this.skeleton.slots, r = this.color, h = null, u = null; r ? (h = r.light, u = r.dark) : h = this.tintRgb; for (var a = 0, l = e.length; a < l; a++) { var c = (N = e[a]).getAttachment(), v = this.slotContainers[a]; if (c) { var d = null; c.sequence && c.sequence.apply(N, c); var _ = c.region, p = c.color; switch (null != c && c.type) { case s.Region: if (v.transform.setFromMatrix(N.bone.matrix), _ = c.region, N.currentMesh && (N.currentMesh.visible = !1, N.currentMesh = null, N.currentMeshId = void 0, N.currentMeshName = void 0), !_) { N.currentSprite && (N.currentSprite.renderable = !1); break } if (!N.currentSpriteName || N.currentSpriteName !== c.name) { var m = c.name; if (N.currentSprite && (N.currentSprite.visible = !1), N.sprites = N.sprites || {}, void 0 !== N.sprites[m]) N.sprites[m].visible = !0; else { var b = this.createSprite(N, c, m); v.addChild(b) } N.currentSprite = N.sprites[m], N.currentSpriteName = m } N.currentSprite.renderable = !0, N.hackRegion || this.setSpriteRegion(c, N.currentSprite, _), N.currentSprite.color ? d = N.currentSprite.color : (K[0] = h[0] * N.color.r * p.r, K[1] = h[1] * N.color.g * p.g, K[2] = h[2] * N.color.b * p.b, N.currentSprite.tint = (0, f.rgb2hex)(K)), N.currentSprite.blendMode = N.blendMode; break; case s.Mesh: if (N.currentSprite) { N.currentSprite.visible = !1, N.currentSprite = null, N.currentSpriteName = void 0; var w = new o.wx; w.P = -1, w.L = v.transform.L, v.transform = w } if (!_) { N.currentMesh && (N.currentMesh.renderable = !1); break } var g = c.id; if (void 0 === N.currentMeshId || N.currentMeshId !== g) { var y = g; if (N.currentMesh && (N.currentMesh.visible = !1), N.meshes = N.meshes || {}, void 0 !== N.meshes[y]) N.meshes[y].visible = !0; else { var E = this.createMesh(N, c); v.addChild(E) } N.currentMesh = N.meshes[y], N.currentMeshName = c.name, N.currentMeshId = y } N.currentMesh.renderable = !0, c.computeWorldVerticesOld(N, N.currentMesh.vertices), N.currentMesh.color ? d = N.currentMesh.color : (K[0] = h[0] * N.color.r * p.r, K[1] = h[1] * N.color.g * p.g, K[2] = h[2] * N.color.b * p.b, N.currentMesh.tint = (0, f.rgb2hex)(K)), N.currentMesh.blendMode = N.blendMode, N.hackRegion || this.setMeshRegion(c, N.currentMesh, _); break; case s.Clipping: N.currentGraphics || (this.createGraphics(N, c), v.addChild(N.clippingContainer), v.addChild(N.currentGraphics)), this.updateGraphics(N, c), v.alpha = 1, v.visible = !0; continue; default: v.visible = !1; continue } if (v.visible = !0, d) { var S = N.color.r * p.r, A = N.color.g * p.g, T = N.color.b * p.b; d.setLight(h[0] * S + u[0] * (1 - S), h[1] * A + u[1] * (1 - A), h[2] * T + u[2] * (1 - T)), N.darkColor ? (S = N.darkColor.r, A = N.darkColor.g, T = N.darkColor.b) : (S = 0, A = 0, T = 0), d.setDark(h[0] * S + u[0] * (1 - S), h[1] * A + u[1] * (1 - A), h[2] * T + u[2] * (1 - T)) } v.alpha = N.color.a } else v.visible = !1 } var M = this.skeleton.drawOrder, O = null, I = null; for (a = 0, l = M.length; a < l; a++) { var N = e[M[a].data.index]; v = this.slotContainers[M[a].data.index]; if (I || null !== v.parent && v.parent !== this && (v.parent.removeChild(v), v.parent = this), N.currentGraphics && N.getAttachment()) I = N.clippingContainer, O = N.getAttachment(), I.children.length = 0, this.children[a] = v, O.endSlot === N.data && (O.endSlot = null); else if (I) { var R = this.tempClipContainers[a]; R || ((R = this.tempClipContainers[a] = this.newContainer()).visible = !1), this.children[a] = R, v.parent = null, I.addChild(v), O.endSlot == N.data && (I.renderable = !0, I = null, O = null) } else this.children[a] = v } null === (i = this.O) || void 0 === i || i.renderDebug(this) } }, i.prototype.setSpriteRegion = function(t, i, n) { i.attachment === t && i.region === n || (i.region = n, i.attachment = t, i.texture = n.texture, i.rotation = t.rotation * W.degRad, i.position.x = t.x, i.position.y = t.y, i.alpha = t.color.a, n.size ? (i.scale.x = n.size.width / n.originalWidth, i.scale.y = -n.size.height / n.originalHeight) : (i.scale.x = t.scaleX * t.width / n.originalWidth, i.scale.y = -t.scaleY * t.height / n.originalHeight)) }, i.prototype.setMeshRegion = function(t, i, n) { i.attachment === t && i.region === n || (i.region = n, i.attachment = t, i.texture = n.texture, n.texture.updateUvs(), i.uvBuffer.update(t.regionUVs)) }, i.prototype.autoUpdateTransform = function() { if (z.GLOBAL_AUTO_UPDATE) { this.lastTime = this.lastTime || Date.now(); var t = .001 * (Date.now() - this.lastTime); this.lastTime = Date.now(), this.update(t) } else this.lastTime = 0; u.W2.prototype.updateTransform.call(this) }, i.prototype.createSprite = function(t, i, n) { var s = i.region; t.hackAttachment === i && (s = t.hackRegion); var e = this.newSprite(s ? s.texture : null); return e.anchor.set(.5), s && this.setSpriteRegion(i, e, i.region), t.sprites = t.sprites || {}, t.sprites[n] = e, e }, i.prototype.createMesh = function(t, i) { var n = i.region; t.hackAttachment === i && (n = t.hackRegion, t.hackAttachment = null, t.hackRegion = null); var s = this.newMesh(n ? n.texture : null, new Float32Array(i.regionUVs.length), i.regionUVs, new Uint16Array(i.triangles), r.lg.TRIANGLES); return void 0 !== s.C && (s.C = 1.5), s.alpha = i.color.a, s.region = i.region, n && this.setMeshRegion(i, s, n), t.meshes = t.meshes || {}, t.meshes[i.id] = s, s }, i.prototype.createGraphics = function(t, i) { var n = this.newGraphics(), s = new o.mg([]); return n.clear(), n.beginFill(16777215, 1), n.drawPolygon(s), n.renderable = !1, t.currentGraphics = n, t.clippingContainer = this.newContainer(), t.clippingContainer.mask = t.currentGraphics, n }, i.prototype.updateGraphics = function(t, i) { var n = t.currentGraphics.geometry, s = n.graphicsData[0].shape.points, e = i.worldVerticesLength; s.length = e, i.computeWorldVertices(t, 0, e, s, 0, 2), n.invalidate() }, i.prototype.hackTextureBySlotIndex = function(t, i, n) { void 0 === i && (i = null), void 0 === n && (n = null); var s = this.skeleton.slots[t]; if (!s) return !1; var e = s.getAttachment(), r = e.region; return i ? ((r = new x).texture = i, r.size = n, s.hackRegion = r, s.hackAttachment = e) : (s.hackRegion = null, s.hackAttachment = null), s.currentSprite ? this.setSpriteRegion(e, s.currentSprite, r) : s.currentMesh && this.setMeshRegion(e, s.currentMesh, r), !0 }, i.prototype.hackTextureBySlotName = function(t, i, n) { void 0 === i && (i = null), void 0 === n && (n = null); var s = this.skeleton.findSlotIndex(t); return -1 != s && this.hackTextureBySlotIndex(s, i, n) }, i.prototype.hackTextureAttachment = function(t, i, n, s) { void 0 === s && (s = null); var e = this.skeleton.findSlotIndex(t), r = this.skeleton.getAttachmentByName(t, i); r.region.texture = n; var h = this.skeleton.slots[e]; if (!h) return !1; var o = h.getAttachment(); if (i === o.name) { var u = r.region; return n ? ((u = new x).texture = n, u.size = s, h.hackRegion = u, h.hackAttachment = o) : (h.hackRegion = null, h.hackAttachment = null), h.currentSprite && h.currentSprite.region != u ? (this.setSpriteRegion(o, h.currentSprite, u), h.currentSprite.region = u) : h.currentMesh && h.currentMesh.region != u && this.setMeshRegion(o, h.currentMesh, u), !0 } return !1 }, i.prototype.newContainer = function() { return new u.W2 }, i.prototype.newSprite = function(t) { return new q(t) }, i.prototype.newGraphics = function() { return new c.TC }, i.prototype.newMesh = function(t, i, n, s, e) { return new Z(t, i, n, s, e) }, i.prototype.transformHack = function() { return 1 }, i.prototype.hackAttachmentGroups = function(t, i, n) { if (t) { for (var s = [], e = [], r = 0, h = this.skeleton.slots.length; r < h; r++) { var o = this.skeleton.slots[r], u = o.currentSprite || o.currentMesh; (o.currentSpriteName || o.currentMeshName || "").endsWith(t) ? (u.parentGroup = i, e.push(u)) : n && u && (u.parentGroup = n, s.push(u)) } return [s, e] } }, i.prototype.destroy = function(i) { this.debug = null; for (var n = 0, s = this.skeleton.slots.length; n < s; n++) { var e = this.skeleton.slots[n]; for (var r in e.meshes) e.meshes[r].destroy(i); for (var h in e.meshes = null, e.sprites) e.sprites[h].destroy(i); e.sprites = null } for (n = 0, s = this.slotContainers.length; n < s; n++) this.slotContainers[n].destroy(i); this.spineData = null, this.skeleton = null, this.slotContainers = null, this.stateData = null, this.state = null, this.tempClipContainers = null, t.prototype.destroy.call(this, i) }, i.clippingPolygon = [], i }(u.W2); Object.defineProperty(J.prototype, "visible", { get: function() { return this.U }, set: function(t) { t !== this.U && (this.U = t, t && (this.lastTime = 0)) } }); ! function() { function t() { this.registeredSpines = new Map, this.drawDebug = !0, this.drawMeshHull = !0, this.drawMeshTriangles = !0, this.drawBones = !0, this.drawPaths = !0, this.drawBoundingBoxes = !0, this.drawClipping = !0, this.drawRegionAttachments = !0, this.lineWidth = 1, this.regionAttachmentsColor = 30975, this.meshHullColor = 30975, this.meshTrianglesColor = 16763904, this.clippingPolygonColor = 16711935, this.boundingBoxesRectColor = 65280, this.boundingBoxesPolygonColor = 65280, this.boundingBoxesCircleColor = 65280, this.pathsCurveColor = 16711680, this.pathsLineColor = 16711935, this.skeletonXYColor = 16711680, this.bonesColor = 61132 } t.prototype.registerSpine = function(t) { this.registeredSpines.has(t); var i = { parentDebugContainer: new u.W2, bones: new u.W2, skeletonXY: new c.TC, regionAttachmentsShape: new c.TC, meshTrianglesLine: new c.TC, meshHullLine: new c.TC, clippingPolygon: new c.TC, boundingBoxesRect: new c.TC, boundingBoxesCircle: new c.TC, boundingBoxesPolygon: new c.TC, pathsCurve: new c.TC, pathsLine: new c.TC }; i.parentDebugContainer.addChild(i.bones), i.parentDebugContainer.addChild(i.skeletonXY), i.parentDebugContainer.addChild(i.regionAttachmentsShape), i.parentDebugContainer.addChild(i.meshTrianglesLine), i.parentDebugContainer.addChild(i.meshHullLine), i.parentDebugContainer.addChild(i.clippingPolygon), i.parentDebugContainer.addChild(i.boundingBoxesRect), i.parentDebugContainer.addChild(i.boundingBoxesCircle), i.parentDebugContainer.addChild(i.boundingBoxesPolygon), i.parentDebugContainer.addChild(i.pathsCurve), i.parentDebugContainer.addChild(i.pathsLine), t.addChild(i.parentDebugContainer), this.registeredSpines.set(t, i) }, t.prototype.renderDebug = function(t) { this.registeredSpines.has(t) || this.registerSpine(t); var i = this.registeredSpines.get(t); i.skeletonXY.clear(), i.regionAttachmentsShape.clear(), i.meshTrianglesLine.clear(), i.meshHullLine.clear(), i.clippingPolygon.clear(), i.boundingBoxesRect.clear(), i.boundingBoxesCircle.clear(), i.boundingBoxesPolygon.clear(), i.pathsCurve.clear(), i.pathsLine.clear(); for (var n = i.bones.children.length; n > 0; n--) i.bones.children[n - 1].destroy({ children: !0, texture: !0, baseTexture: !0 }); var s = t.scale.x || t.scale.y || 1, e = this.lineWidth / s; this.drawBones && this.drawBonesFunc(t, i, e, s), this.drawPaths && this.drawPathsFunc(t, i, e), this.drawBoundingBoxes && this.drawBoundingBoxesFunc(t, i, e), this.drawClipping && this.drawClippingFunc(t, i, e), (this.drawMeshHull || this.drawMeshTriangles) && this.drawMeshHullAndMeshTriangles(t, i, e), this.drawRegionAttachments && this.drawRegionAttachmentsFunc(t, i, e) }, t.prototype.drawBonesFunc = function(t, i, n, s) { var e = t.skeleton, r = e.x, h = e.y, o = e.bones; i.skeletonXY.lineStyle(n, this.skeletonXYColor, 1); for (var u = 0, a = o.length; u < a; u++) { var l = o[u], f = l.data.length, v = r + l.matrix.tx, d = h + l.matrix.ty, _ = r + f * l.matrix.a + l.matrix.tx, p = h + f * l.matrix.b + l.matrix.ty; if ("root" !== l.data.name && null !== l.data.parent) { var m = Math.abs(v - _), b = Math.abs(d - p), w = Math.pow(m, 2), g = b, y = Math.pow(b, 2), E = Math.sqrt(w + y), S = Math.pow(E, 2), A = Math.PI / 180, T = Math.acos((S + y - w) / (2 * g * E)) || 0; if (0 !== E) { var M = new c.TC; i.bones.addChild(M); var O = E / 50 / s; M.beginFill(this.bonesColor, 1), M.drawPolygon(0, 0, 0 - O, E - 3 * O, 0, E - O, 0 + O, E - 3 * O), M.endFill(), M.x = v, M.y = d, M.pivot.y = E; var I = 0; v < _ && d < p ? I = 180 * A - T : v > _ && d < p ? I = 180 * A + T : v > _ && d > p ? I = -T : v < _ && d > p ? I = T : d === p && v < _ ? I = 90 * A : d === p && v > _ ? I = -90 * A : v === _ && d < p ? I = 180 * A : v === _ && d > p && (I = 0), M.rotation = I, M.lineStyle(n + O / 2.4, this.bonesColor, 1), M.beginFill(0, .6), M.drawCircle(0, E, 1.2 * O), M.endFill() } } } var N = 3 * n; i.skeletonXY.moveTo(r - N, h - N), i.skeletonXY.lineTo(r + N, h + N), i.skeletonXY.moveTo(r + N, h - N), i.skeletonXY.lineTo(r - N, h + N) }, t.prototype.drawRegionAttachmentsFunc = function(t, i, n) { var e = t.skeleton.slots; i.regionAttachmentsShape.lineStyle(n, this.regionAttachmentsColor, 1); for (var r = 0, h = e.length; r < h; r++) { var o = e[r], u = o.getAttachment(); if (null != u && u.type === s.Region) { var a = u, l = new Float32Array(8); null == a || a.updateOffset(), a.computeWorldVertices(o, l, 0, 2), i.regionAttachmentsShape.drawPolygon(Array.from(l.slice(0, 8))) } } }, t.prototype.drawMeshHullAndMeshTriangles = function(t, i, n) { var e = t.skeleton.slots; i.meshHullLine.lineStyle(n, this.meshHullColor, 1), i.meshTrianglesLine.lineStyle(n, this.meshTrianglesColor, 1); for (var r = 0, h = e.length; r < h; r++) { var o = e[r]; if (o.bone.active) { var u = o.getAttachment(); if (null != u && u.type === s.Mesh) { var a = u, l = new Float32Array(a.worldVerticesLength), c = a.triangles, f = a.hullLength; if (a.computeWorldVertices(o, 0, a.worldVerticesLength, l, 0, 2), this.drawMeshTriangles) for (var v = 0, d = c.length; v < d; v += 3) { var _ = 2 * c[v], p = 2 * c[v + 1], m = 2 * c[v + 2]; i.meshTrianglesLine.moveTo(l[_], l[_ + 1]), i.meshTrianglesLine.lineTo(l[p], l[p + 1]), i.meshTrianglesLine.lineTo(l[m], l[m + 1]) } if (this.drawMeshHull && f > 0) for (var b = l[(f = 2 * (f >> 1)) - 2], w = l[f - 1], g = 0, y = f; g < y; g += 2) { var E = l[g], S = l[g + 1]; i.meshHullLine.moveTo(E, S), i.meshHullLine.lineTo(b, w), b = E, w = S } } } } }, t.prototype.drawClippingFunc = function(t, i, n) { var e = t.skeleton.slots; i.clippingPolygon.lineStyle(n, this.clippingPolygonColor, 1); for (var r = 0, h = e.length; r < h; r++) { var o = e[r]; if (o.bone.active) { var u = o.getAttachment(); if (null != u && u.type === s.Clipping) { var a = u, l = a.worldVerticesLength, c = new Float32Array(l); a.computeWorldVertices(o, 0, l, c, 0, 2), i.clippingPolygon.drawPolygon(Array.from(c)) } } } }, t.prototype.drawBoundingBoxesFunc = function(t, i, n) { var s = this; i.boundingBoxesRect.lineStyle(n, this.boundingBoxesRectColor, 5); var e = new Y; e.update(t.skeleton, !0), i.boundingBoxesRect.drawRect(e.minX, e.minY, e.getWidth(), e.getHeight()); for (var r = e.polygons, h = function(t, e, r) { if (i.boundingBoxesPolygon.lineStyle(n, s.boundingBoxesPolygonColor, 1), i.boundingBoxesPolygon.beginFill(s.boundingBoxesPolygonColor, .1), r < 3) throw new Error("Polygon must contain at least 3 vertices"); for (var h = [], o = 2 * n, u = 0, a = t.length; u < a; u += 2) { var l = t[u], c = t[u + 1]; i.boundingBoxesCircle.lineStyle(0), i.boundingBoxesCircle.beginFill(s.boundingBoxesCircleColor), i.boundingBoxesCircle.drawCircle(l, c, o), i.boundingBoxesCircle.endFill(), h.push(l, c) } i.boundingBoxesPolygon.drawPolygon(h), i.boundingBoxesPolygon.endFill() }, o = 0, u = r.length; o < u; o++) { var a = r[o]; h(a, 0, a.length) } }, t.prototype.drawPathsFunc = function(t, i, n) { var e = t.skeleton.slots; i.pathsCurve.lineStyle(n, this.pathsCurveColor, 1), i.pathsLine.lineStyle(n, this.pathsLineColor, 1); for (var r = 0, h = e.length; r < h; r++) { var o = e[r]; if (o.bone.active) { var u = o.getAttachment(); if (null != u && u.type === s.Path) { var a = u, l = a.worldVerticesLength, c = new Float32Array(l); a.computeWorldVertices(o, 0, l, c, 0, 2); var f = c[2], v = c[3], d = 0, _ = 0; if (a.closed) { var p = c[0], m = c[1], b = c[l - 2], w = c[l - 1]; d = c[l - 4], _ = c[l - 3], i.pathsCurve.moveTo(f, v), i.pathsCurve.bezierCurveTo(p, m, b, w, d, _), i.pathsLine.moveTo(f, v), i.pathsLine.lineTo(p, m), i.pathsLine.moveTo(d, _), i.pathsLine.lineTo(b, w) } l -= 4; for (var g = 4; g < l; g += 6) { p = c[g], m = c[g + 1], b = c[g + 2], w = c[g + 3]; d = c[g + 4], _ = c[g + 5], i.pathsCurve.moveTo(f, v), i.pathsCurve.bezierCurveTo(p, m, b, w, d, _), i.pathsLine.moveTo(f, v), i.pathsLine.lineTo(p, m), i.pathsLine.moveTo(d, _), i.pathsLine.lineTo(b, w), f = d, v = _ } } } } }, t.prototype.unregisterSpine = function(t) { this.registeredSpines.has(t), this.registeredSpines.get(t).parentDebugContainer.destroy({ baseTexture: !0, children: !0, texture: !0 }), this.registeredSpines.delete(t) } }() }, 80: (t, i, n) => { "use strict"; n.d(i, { CE: () => ct, HD: () => ut, N0: () => V, PY: () => vt }); var s = n(5182), e = n(229), r = n(4936), h = function(t, i) { return (h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]) })(t, i) }; function o(t, i) { if ("function" != typeof i && null !== i) throw new TypeError("Class extends value " + String(i) + " is not a constructor or null"); function n() { this.constructor = t } h(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) } var u, a, l = function(t) { if (null == t) throw new Error("name cannot be null."); this.name = t }, c = function(t) { function i(n) { var s = t.call(this, n) || this; return s.id = (65535 & i.nextID++) << 11, s.worldVerticesLength = 0, s.deformAttachment = s, s } return o(i, t), i.prototype.computeWorldVerticesOld = function(t, i) { this.computeWorldVertices(t, 0, this.worldVerticesLength, i, 0, 2) }, i.prototype.computeWorldVertices = function(t, i, n, s, e, r) { n = e + (n >> 1) * r; var h = t.bone.skeleton, o = t.deform, u = this.vertices, a = this.bones; if (null != a) { for (var l = 0, c = 0, f = 0; f < i; f += 2) { l += (p = a[l]) + 1, c += p } var v = h.bones; if (0 == o.length) for (I = e, A = 3 * c; I < n; I += r) { var d = 0, _ = 0, p = a[l++]; for (p += l; l < p; l++, A += 3) { d += ((N = u[A]) * (g = v[a[l]].matrix).a + (R = u[A + 1]) * g.c + g.tx) * (w = u[A + 2]), _ += (N * g.b + R * g.d + g.ty) * w } s[I] = d, s[I + 1] = _ } else for (var m = o, b = (I = e, A = 3 * c, c << 1); I < n; I += r) { d = 0, _ = 0, p = a[l++]; for (p += l; l < p; l++, A += 3, b += 2) { var w; d += ((N = u[A] + m[b]) * (g = v[a[l]].matrix).a + (R = u[A + 1] + m[b + 1]) * g.c + g.tx) * (w = u[A + 2]), _ += (N * g.b + R * g.d + g.ty) * w } s[I] = d, s[I + 1] = _ } } else { o.length > 0 && (u = o); for (var g, y = (g = t.bone.matrix).tx, E = g.ty, S = g.a, A = g.c, T = g.b, M = g.d, O = i, I = e; I < n; O += 2, I += r) { var N, R; s[I] = (N = u[O]) * S + (R = u[O + 1]) * A + y, s[I + 1] = N * T + R * M + E } } }, i.prototype.copyTo = function(t) { null != this.bones ? (t.bones = new Array(this.bones.length), s.cQ.arrayCopy(this.bones, 0, t.bones, 0, this.bones.length)) : t.bones = null, null != this.vertices ? (t.vertices = s.cQ.newFloatArray(this.vertices.length), s.cQ.arrayCopy(this.vertices, 0, t.vertices, 0, this.vertices.length)) : t.vertices = null, t.worldVerticesLength = this.worldVerticesLength, t.deformAttachment = this.deformAttachment }, i.nextID = 0, i }(l), f = function(t) { function i(i) { var n = t.call(this, i) || this; return n.type = s.sf.BoundingBox, n.color = new s.Il(1, 1, 1, 1), n } return o(i, t), i.prototype.copy = function() { var t = new i(this.name); return this.copyTo(t), t.color.setFromColor(this.color), t }, i }(c), v = function(t) { function i(i) { var n = t.call(this, i) || this; return n.type = s.sf.Clipping, n.color = new s.Il(.2275, .2275, .8078, 1), n } return o(i, t), i.prototype.copy = function() { var t = new i(this.name); return this.copyTo(t), t.endSlot = this.endSlot, t.color.setFromColor(this.color), t }, i }(c), d = function(t) { function i(i) { var n = t.call(this, i) || this; return n.type = s.sf.Mesh, n.color = new s.Il(1, 1, 1, 1), n.tempColor = new s.Il(0, 0, 0, 0), n } return o(i, t), i.prototype.getParentMesh = function() { return this.parentMesh }, i.prototype.setParentMesh = function(t) { this.parentMesh = t, null != t && (this.bones = t.bones, this.vertices = t.vertices, this.worldVerticesLength = t.worldVerticesLength, this.regionUVs = t.regionUVs, this.triangles = t.triangles, this.hullLength = t.hullLength, this.worldVerticesLength = t.worldVerticesLength) }, i.prototype.copy = function() { if (null != this.parentMesh) return this.newLinkedMesh(); var t = new i(this.name); return t.region = this.region, t.path = this.path, t.color.setFromColor(this.color), this.copyTo(t), t.regionUVs = new Float32Array(this.regionUVs.length), s.cQ.arrayCopy(this.regionUVs, 0, t.regionUVs, 0, this.regionUVs.length), t.triangles = new Array(this.triangles.length), s.cQ.arrayCopy(this.triangles, 0, t.triangles, 0, this.triangles.length), t.hullLength = this.hullLength, null != this.edges && (t.edges = new Array(this.edges.length), s.cQ.arrayCopy(this.edges, 0, t.edges, 0, this.edges.length)), t.width = this.width, t.height = this.height, t }, i.prototype.newLinkedMesh = function() { var t = new i(this.name); return t.region = this.region, t.path = this.path, t.color.setFromColor(this.color), t.deformAttachment = this.deformAttachment, t.setParentMesh(null != this.parentMesh ? this.parentMesh : this), t }, i }(c), _ = function(t) { function i(i) { var n = t.call(this, i) || this; return n.type = s.sf.Path, n.closed = !1, n.constantSpeed = !1, n.color = new s.Il(1, 1, 1, 1), n } return o(i, t), i.prototype.copy = function() { var t = new i(this.name); return this.copyTo(t), t.lengths = new Array(this.lengths.length), s.cQ.arrayCopy(this.lengths, 0, t.lengths, 0, this.lengths.length), t.closed = closed, t.constantSpeed = this.constantSpeed, t.color.setFromColor(this.color), t }, i }(c), p = function(t) { function i(i) { var n = t.call(this, i) || this; return n.type = s.sf.Point, n.color = new s.Il(.38, .94, 0, 1), n } return o(i, t), i.prototype.computeWorldPosition = function(t, i) { var n = t.matrix; return i.x = this.x * n.a + this.y * n.c + t.worldX, i.y = this.x * n.b + this.y * n.d + t.worldY, i }, i.prototype.computeWorldRotation = function(t) { var i = t.matrix, n = s.M8.cosDeg(this.rotation), e = s.M8.sinDeg(this.rotation); return Math.atan2(n * i.b + e * i.d, n * i.a + e * i.c) * s.M8.radDeg }, i.prototype.copy = function() { var t = new i(this.name); return t.x = this.x, t.y = this.y, t.rotation = this.rotation, t.color.setFromColor(this.color), t }, i }(c), m = function() { function t(t, i) { if (this.deform = new Array, null == t) throw new Error("data cannot be null."); if (null == i) throw new Error("bone cannot be null."); this.data = t, this.bone = i, this.color = new s.Il, this.darkColor = null == t.darkColor ? null : new s.Il, this.setToSetupPose(), this.blendMode = this.data.blendMode } return t.prototype.getAttachment = function() { return this.attachment }, t.prototype.setAttachment = function(t) { this.attachment != t && (this.attachment = t, this.attachmentTime = this.bone.skeleton.time, this.deform.length = 0) }, t.prototype.setAttachmentTime = function(t) { this.attachmentTime = this.bone.skeleton.time - t }, t.prototype.getAttachmentTime = function() { return this.bone.skeleton.time - this.attachmentTime }, t.prototype.setToSetupPose = function() { this.color.setFromColor(this.data.color), null != this.darkColor && this.darkColor.setFromColor(this.data.darkColor), null == this.data.attachmentName ? this.attachment = null : (this.attachment = null, this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName))) }, t }(), b = function(t) { function i(i) { var n = t.call(this, i) || this; return n.type = s.sf.Region, n.x = 0, n.y = 0, n.scaleX = 1, n.scaleY = 1, n.rotation = 0, n.width = 0, n.height = 0, n.color = new s.Il(1, 1, 1, 1), n.offset = s.cQ.newFloatArray(8), n.uvs = s.cQ.newFloatArray(8), n.tempColor = new s.Il(1, 1, 1, 1), n } return o(i, t), i.prototype.updateOffset = function() { var t = this.width / this.region.originalWidth * this.scaleX, n = this.height / this.region.originalHeight * this.scaleY, s = -this.width / 2 * this.scaleX + this.region.offsetX * t, e = -this.height / 2 * this.scaleY + this.region.offsetY * n, r = s + this.region.width * t, h = e + this.region.height * n, o = this.rotation * Math.PI / 180, u = Math.cos(o), a = Math.sin(o), l = s * u + this.x, c = s * a, f = e * u + this.y, v = e * a, d = r * u + this.x, _ = r * a, p = h * u + this.y, m = h * a, b = this.offset; b[i.OX1] = l - v, b[i.OY1] = f + c, b[i.OX2] = l - m, b[i.OY2] = p + c, b[i.OX3] = d - m, b[i.OY3] = p + _, b[i.OX4] = d - v, b[i.OY4] = f + _ }, i.prototype.setRegion = function(t) { this.region = t; var i = this.uvs; t.rotate ? (i[2] = t.u, i[3] = t.v2, i[4] = t.u, i[5] = t.v, i[6] = t.u2, i[7] = t.v, i[0] = t.u2, i[1] = t.v2) : (i[0] = t.u, i[1] = t.v2, i[2] = t.u, i[3] = t.v, i[4] = t.u2, i[5] = t.v, i[6] = t.u2, i[7] = t.v2) }, i.prototype.computeWorldVertices = function(t, n, s, e) { var r = this.offset, h = t instanceof m ? t.bone.matrix : t.matrix, o = h.tx, u = h.ty, a = h.a, l = h.c, c = h.b, f = h.d, v = 0, d = 0; n[s] = (v = r[i.OX1]) * a + (d = r[i.OY1]) * l + o, n[s + 1] = v * c + d * f + u, n[s += e] = (v = r[i.OX2]) * a + (d = r[i.OY2]) * l + o, n[s + 1] = v * c + d * f + u, n[s += e] = (v = r[i.OX3]) * a + (d = r[i.OY3]) * l + o, n[s + 1] = v * c + d * f + u, n[s += e] = (v = r[i.OX4]) * a + (d = r[i.OY4]) * l + o, n[s + 1] = v * c + d * f + u }, i.prototype.copy = function() { var t = new i(this.name); return t.region = this.region, t.rendererObject = this.rendererObject, t.path = this.path, t.x = this.x, t.y = this.y, t.scaleX = this.scaleX, t.scaleY = this.scaleY, t.rotation = this.rotation, t.width = this.width, t.height = this.height, s.cQ.arrayCopy(this.uvs, 0, t.uvs, 0, 8), s.cQ.arrayCopy(this.offset, 0, t.offset, 0, 8), t.color.setFromColor(this.color), t }, i.OX1 = 0, i.OY1 = 1, i.OX2 = 2, i.OY2 = 3, i.OX3 = 4, i.OY3 = 5, i.OX4 = 6, i.OY4 = 7, i.X1 = 0, i.Y1 = 1, i.C1R = 2, i.C1G = 3, i.C1B = 4, i.C1A = 5, i.U1 = 6, i.V1 = 7, i.X2 = 8, i.Y2 = 9, i.C2R = 10, i.C2G = 11, i.C2B = 12, i.C2A = 13, i.U2 = 14, i.V2 = 15, i.X3 = 16, i.Y3 = 17, i.C3R = 18, i.C3G = 19, i.C3B = 20, i.C3A = 21, i.U3 = 22, i.V3 = 23, i.X4 = 24, i.Y4 = 25, i.C4R = 26, i.C4G = 27, i.C4B = 28, i.C4A = 29, i.U4 = 30, i.V4 = 31, i }(l), w = (function() { function t(t, i) { this.jitterX = 0, this.jitterY = 0, this.jitterX = t, this.jitterY = i } t.prototype.begin = function(t) {}, t.prototype.transform = function(t, i, n, e) { t.x += s.M8.randomTriangular(-this.jitterX, this.jitterY), t.y += s.M8.randomTriangular(-this.jitterX, this.jitterY) }, t.prototype.end = function() {} }(), function() { function t(t) { this.centerX = 0, this.centerY = 0, this.radius = 0, this.angle = 0, this.worldX = 0, this.worldY = 0, this.radius = t } t.prototype.begin = function(t) { this.worldX = t.x + this.centerX, this.worldY = t.y + this.centerY }, t.prototype.transform = function(i, n, e, r) { var h = this.angle * s.M8.degreesToRadians, o = i.x - this.worldX, u = i.y - this.worldY, a = Math.sqrt(o * o + u * u); if (a < this.radius) { var l = t.interpolation.apply(0, h, (this.radius - a) / this.radius), c = Math.cos(l), f = Math.sin(l); i.x = c * o - f * u + this.worldX, i.y = f * o + c * u + this.worldY } }, t.prototype.end = function() {}, t.interpolation = new s.RN(2) }(), function() { function t(t, i, n) { if (null == t) throw new Error("name cannot be null."); if (null == i) throw new Error("timelines cannot be null."); this.name = t, this.timelines = i, this.timelineIds = []; for (var s = 0; s < i.length; s++) this.timelineIds[i[s].getPropertyId()] = !0; this.duration = n } return t.prototype.hasTimeline = function(t) { return 1 == this.timelineIds[t] }, t.prototype.apply = function(t, i, n, s, e, r, h, o) { if (null == t) throw new Error("skeleton cannot be null."); s && 0 != this.duration && (n %= this.duration, i > 0 && (i %= this.duration)); for (var u = this.timelines, a = 0, l = u.length; a < l; a++) u[a].apply(t, i, n, e, r, h, o) }, t.binarySearch = function(t, i, n) { void 0 === n && (n = 1); var s = 0, e = t.length / n - 2; if (0 == e) return n; for (var r = e >>> 1;;) { if (t[(r + 1) * n] <= i ? s = r + 1 : e = r, s == e) return (s + 1) * n; r = s + e >>> 1 } }, t.linearSearch = function(t, i, n) { for (var s = 0, e = t.length - n; s <= e; s += n) if (t[s] > i) return s; return -1 }, t }()); (a = u || (u = {}))[a.rotate = 0] = "rotate", a[a.translate = 1] = "translate", a[a.scale = 2] = "scale", a[a.shear = 3] = "shear", a[a.attachment = 4] = "attachment", a[a.color = 5] = "color", a[a.deform = 6] = "deform", a[a.event = 7] = "event", a[a.drawOrder = 8] = "drawOrder", a[a.ikConstraint = 9] = "ikConstraint", a[a.transformConstraint = 10] = "transformConstraint", a[a.pathConstraintPosition = 11] = "pathConstraintPosition", a[a.pathConstraintSpacing = 12] = "pathConstraintSpacing", a[a.pathConstraintMix = 13] = "pathConstraintMix", a[a.twoColor = 14] = "twoColor"; var g, y, E = function() { function t(i) { if (i <= 0) throw new Error("frameCount must be > 0: " + i); this.curves = s.cQ.newFloatArray((i - 1) * t.BEZIER_SIZE) } return t.prototype.getFrameCount = function() { return this.curves.length / t.BEZIER_SIZE + 1 }, t.prototype.setLinear = function(i) { this.curves[i * t.BEZIER_SIZE] = t.LINEAR }, t.prototype.setStepped = function(i) { this.curves[i * t.BEZIER_SIZE] = t.STEPPED }, t.prototype.getCurveType = function(i) { var n = i * t.BEZIER_SIZE; if (n == this.curves.length) return t.LINEAR; var s = this.curves[n]; return s == t.LINEAR ? t.LINEAR : s == t.STEPPED ? t.STEPPED : t.BEZIER }, t.prototype.setCurve = function(i, n, s, e, r) { var h = .03 * (2 * -n + e), o = .03 * (2 * -s + r), u = .006 * (3 * (n - e) + 1), a = .006 * (3 * (s - r) + 1), l = 2 * h + u, c = 2 * o + a, f = .3 * n + h + .16666667 * u, v = .3 * s + o + .16666667 * a, d = i * t.BEZIER_SIZE, _ = this.curves; _[d++] = t.BEZIER; for (var p = f, m = v, b = d + t.BEZIER_SIZE - 1; d < b; d += 2) _[d] = p, _[d + 1] = m, f += l, v += c, l += u, c += a, p += f, m += v }, t.prototype.getCurvePercent = function(i, n) { n = s.M8.clamp(n, 0, 1); var e = this.curves, r = i * t.BEZIER_SIZE, h = e[r]; if (h == t.LINEAR) return n; if (h == t.STEPPED) return 0; for (var o = 0, u = ++r, a = r + t.BEZIER_SIZE - 1; r < a; r += 2) if ((o = e[r]) >= n) { var l = void 0, c = void 0; return r == u ? (l = 0, c = 0) : (l = e[r - 2], c = e[r - 1]), c + (e[r + 1] - c) * (n - l) / (o - l) } var f = e[r - 1]; return f + (1 - f) * (n - o) / (1 - o) }, t.LINEAR = 0, t.STEPPED = 1, t.BEZIER = 2, t.BEZIER_SIZE = 19, t }(), S = function(t) { function i(i) { var n = t.call(this, i) || this; return n.frames = s.cQ.newFloatArray(i << 1), n } return o(i, t), i.prototype.getPropertyId = function() { return (u.rotate << 24) + this.boneIndex }, i.prototype.setFrame = function(t, n, s) { this.frames[t <<= 1] = n, this.frames[t + i.ROTATION] = s }, i.prototype.apply = function(t, n, e, r, h, o, u) { var a = this.frames, l = t.bones[this.boneIndex]; if (l.active) if (e < a[0]) switch (o) { case s.bq.setup: return void(l.rotation = l.data.rotation); case s.bq.first: var c = l.data.rotation - l.rotation; l.rotation += (c - 360 * (16384 - (16384.499999999996 - c / 360 | 0))) * h } else if (e >= a[a.length - i.ENTRIES]) { var f = a[a.length + i.PREV_ROTATION]; switch (o) { case s.bq.setup: l.rotation = l.data.rotation + f * h; break; case s.bq.first: case s.bq.replace: f += l.data.rotation - l.rotation, f -= 360 * (16384 - (16384.499999999996 - f / 360 | 0)); case s.bq.add: l.rotation += f * h } } else { var v = w.binarySearch(a, e, i.ENTRIES), d = a[v + i.PREV_ROTATION], _ = a[v], p = this.getCurvePercent((v >> 1) - 1, 1 - (e - _) / (a[v + i.PREV_TIME] - _)), m = a[v + i.ROTATION] - d; switch (m = d + (m - 360 * (16384 - (16384.499999999996 - m / 360 | 0))) * p, o) { case s.bq.setup: l.rotation = l.data.rotation + (m - 360 * (16384 - (16384.499999999996 - m / 360 | 0))) * h; break; case s.bq.first: case s.bq.replace: m += l.data.rotation - l.rotation; case s.bq.add: l.rotation += (m - 360 * (16384 - (16384.499999999996 - m / 360 | 0))) * h } } }, i.ENTRIES = 2, i.PREV_TIME = -2, i.PREV_ROTATION = -1, i.ROTATION = 1, i }(E), A = function(t) { function i(n) { var e = t.call(this, n) || this; return e.frames = s.cQ.newFloatArray(n * i.ENTRIES), e } return o(i, t), i.prototype.getPropertyId = function() { return (u.translate << 24) + this.boneIndex }, i.prototype.setFrame = function(t, n, s, e) { this.frames[t *= i.ENTRIES] = n, this.frames[t + i.X] = s, this.frames[t + i.Y] = e }, i.prototype.apply = function(t, n, e, r, h, o, u) { var a = this.frames, l = t.bones[this.boneIndex]; if (l.active) if (e < a[0]) switch (o) { case s.bq.setup: return l.x = l.data.x, void(l.y = l.data.y); case s.bq.first: l.x += (l.data.x - l.x) * h, l.y += (l.data.y - l.y) * h } else { var c = 0, f = 0; if (e >= a[a.length - i.ENTRIES]) c = a[a.length + i.PREV_X], f = a[a.length + i.PREV_Y]; else { var v = w.binarySearch(a, e, i.ENTRIES); c = a[v + i.PREV_X], f = a[v + i.PREV_Y]; var d = a[v], _ = this.getCurvePercent(v / i.ENTRIES - 1, 1 - (e - d) / (a[v + i.PREV_TIME] - d)); c += (a[v + i.X] - c) * _, f += (a[v + i.Y] - f) * _ } switch (o) { case s.bq.setup: l.x = l.data.x + c * h, l.y = l.data.y + f * h; break; case s.bq.first: case s.bq.replace: l.x += (l.data.x + c - l.x) * h, l.y += (l.data.y + f - l.y) * h; break; case s.bq.add: l.x += c * h, l.y += f * h } } }, i.ENTRIES = 3, i.PREV_TIME = -3, i.PREV_X = -2, i.PREV_Y = -1, i.X = 1, i.Y = 2, i }(E), T = function(t) { function i(i) { return t.call(this, i) || this } return o(i, t), i.prototype.getPropertyId = function() { return (u.scale << 24) + this.boneIndex }, i.prototype.apply = function(t, n, e, r, h, o, u) { var a = this.frames, l = t.bones[this.boneIndex]; if (l.active) if (e < a[0]) switch (o) { case s.bq.setup: return l.scaleX = l.data.scaleX, void(l.scaleY = l.data.scaleY); case s.bq.first: l.scaleX += (l.data.scaleX - l.scaleX) * h, l.scaleY += (l.data.scaleY - l.scaleY) * h } else { var c = 0, f = 0; if (e >= a[a.length - i.ENTRIES]) c = a[a.length + i.PREV_X] * l.data.scaleX, f = a[a.length + i.PREV_Y] * l.data.scaleY; else { var v = w.binarySearch(a, e, i.ENTRIES); c = a[v + i.PREV_X], f = a[v + i.PREV_Y]; var d = a[v], _ = this.getCurvePercent(v / i.ENTRIES - 1, 1 - (e - d) / (a[v + i.PREV_TIME] - d)); c = (c + (a[v + i.X] - c) * _) * l.data.scaleX, f = (f + (a[v + i.Y] - f) * _) * l.data.scaleY } if (1 == h) o == s.bq.add ? (l.scaleX += c - l.data.scaleX, l.scaleY += f - l.data.scaleY) : (l.scaleX = c, l.scaleY = f); else { var p = 0, m = 0; if (u == s.mJ.mixOut) switch (o) { case s.bq.setup: m = l.data.scaleY, l.scaleX = (p = l.data.scaleX) + (Math.abs(c) * s.M8.signum(p) - p) * h, l.scaleY = m + (Math.abs(f) * s.M8.signum(m) - m) * h; break; case s.bq.first: case s.bq.replace: m = l.scaleY, l.scaleX = (p = l.scaleX) + (Math.abs(c) * s.M8.signum(p) - p) * h, l.scaleY = m + (Math.abs(f) * s.M8.signum(m) - m) * h; break; case s.bq.add: m = l.scaleY, l.scaleX = (p = l.scaleX) + (Math.abs(c) * s.M8.signum(p) - l.data.scaleX) * h, l.scaleY = m + (Math.abs(f) * s.M8.signum(m) - l.data.scaleY) * h } else switch (o) { case s.bq.setup: p = Math.abs(l.data.scaleX) * s.M8.signum(c), m = Math.abs(l.data.scaleY) * s.M8.signum(f), l.scaleX = p + (c - p) * h, l.scaleY = m + (f - m) * h; break; case s.bq.first: case s.bq.replace: p = Math.abs(l.scaleX) * s.M8.signum(c), m = Math.abs(l.scaleY) * s.M8.signum(f), l.scaleX = p + (c - p) * h, l.scaleY = m + (f - m) * h; break; case s.bq.add: p = s.M8.signum(c), m = s.M8.signum(f), l.scaleX = Math.abs(l.scaleX) * p + (c - Math.abs(l.data.scaleX) * p) * h, l.scaleY = Math.abs(l.scaleY) * m + (f - Math.abs(l.data.scaleY) * m) * h } } } }, i }(A), M = function(t) { function i(i) { return t.call(this, i) || this } return o(i, t), i.prototype.getPropertyId = function() { return (u.shear << 24) + this.boneIndex }, i.prototype.apply = function(t, n, e, r, h, o, u) { var a = this.frames, l = t.bones[this.boneIndex]; if (l.active) if (e < a[0]) switch (o) { case s.bq.setup: return l.shearX = l.data.shearX, void(l.shearY = l.data.shearY); case s.bq.first: l.shearX += (l.data.shearX - l.shearX) * h, l.shearY += (l.data.shearY - l.shearY) * h } else { var c = 0, f = 0; if (e >= a[a.length - i.ENTRIES]) c = a[a.length + i.PREV_X], f = a[a.length + i.PREV_Y]; else { var v = w.binarySearch(a, e, i.ENTRIES); c = a[v + i.PREV_X], f = a[v + i.PREV_Y]; var d = a[v], _ = this.getCurvePercent(v / i.ENTRIES - 1, 1 - (e - d) / (a[v + i.PREV_TIME] - d)); c += (a[v + i.X] - c) * _, f += (a[v + i.Y] - f) * _ } switch (o) { case s.bq.setup: l.shearX = l.data.shearX + c * h, l.shearY = l.data.shearY + f * h; break; case s.bq.first: case s.bq.replace: l.shearX += (l.data.shearX + c - l.shearX) * h, l.shearY += (l.data.shearY + f - l.shearY) * h; break; case s.bq.add: l.shearX += c * h, l.shearY += f * h } } }, i }(A), O = function(t) { function i(n) { var e = t.call(this, n) || this; return e.frames = s.cQ.newFloatArray(n * i.ENTRIES), e } return o(i, t), i.prototype.getPropertyId = function() { return (u.color << 24) + this.slotIndex }, i.prototype.setFrame = function(t, n, s, e, r, h) { this.frames[t *= i.ENTRIES] = n, this.frames[t + i.R] = s, this.frames[t + i.G] = e, this.frames[t + i.B] = r, this.frames[t + i.A] = h }, i.prototype.apply = function(t, n, e, r, h, o, u) { var a = t.slots[this.slotIndex]; if (a.bone.active) { var l = this.frames; if (e < l[0]) switch (o) { case s.bq.setup: return void a.color.setFromColor(a.data.color); case s.bq.first: var c = a.data.color; (y = a.color).add((c.r - y.r) * h, (c.g - y.g) * h, (c.b - y.b) * h, (c.a - y.a) * h) } else { var f = 0, v = 0, d = 0, _ = 0; if (e >= l[l.length - i.ENTRIES]) { var p = l.length; f = l[p + i.PREV_R], v = l[p + i.PREV_G], d = l[p + i.PREV_B], _ = l[p + i.PREV_A] } else { var m = w.binarySearch(l, e, i.ENTRIES); f = l[m + i.PREV_R], v = l[m + i.PREV_G], d = l[m + i.PREV_B], _ = l[m + i.PREV_A]; var b = l[m], g = this.getCurvePercent(m / i.ENTRIES - 1, 1 - (e - b) / (l[m + i.PREV_TIME] - b)); f += (l[m + i.R] - f) * g, v += (l[m + i.G] - v) * g, d += (l[m + i.B] - d) * g, _ += (l[m + i.A] - _) * g } if (1 == h) a.color.set(f, v, d, _); else { var y = a.color; o == s.bq.setup && y.setFromColor(a.data.color), y.add((f - y.r) * h, (v - y.g) * h, (d - y.b) * h, (_ - y.a) * h) } } } }, i.ENTRIES = 5, i.PREV_TIME = -5, i.PREV_R = -4, i.PREV_G = -3, i.PREV_B = -2, i.PREV_A = -1, i.R = 1, i.G = 2, i.B = 3, i.A = 4, i }(E), I = function(t) { function i(n) { var e = t.call(this, n) || this; return e.frames = s.cQ.newFloatArray(n * i.ENTRIES), e } return o(i, t), i.prototype.getPropertyId = function() { return (u.twoColor << 24) + this.slotIndex }, i.prototype.setFrame = function(t, n, s, e, r, h, o, u, a) { this.frames[t *= i.ENTRIES] = n, this.frames[t + i.R] = s, this.frames[t + i.G] = e, this.frames[t + i.B] = r, this.frames[t + i.A] = h, this.frames[t + i.R2] = o, this.frames[t + i.G2] = u, this.frames[t + i.B2] = a }, i.prototype.apply = function(t, n, e, r, h, o, u) { var a = t.slots[this.slotIndex]; if (a.bone.active) { var l = this.frames; if (e < l[0]) switch (o) { case s.bq.setup: return a.color.setFromColor(a.data.color), void a.darkColor.setFromColor(a.data.darkColor); case s.bq.first: var c = a.darkColor, f = a.data.color, v = a.data.darkColor; (M = a.color).add((f.r - M.r) * h, (f.g - M.g) * h, (f.b - M.b) * h, (f.a - M.a) * h), c.add((v.r - c.r) * h, (v.g - c.g) * h, (v.b - c.b) * h, 0) } else { var d = 0, _ = 0, p = 0, m = 0, b = 0, g = 0, y = 0; if (e >= l[l.length - i.ENTRIES]) { var E = l.length; d = l[E + i.PREV_R], _ = l[E + i.PREV_G], p = l[E + i.PREV_B], m = l[E + i.PREV_A], b = l[E + i.PREV_R2], g = l[E + i.PREV_G2], y = l[E + i.PREV_B2] } else { var S = w.binarySearch(l, e, i.ENTRIES); d = l[S + i.PREV_R], _ = l[S + i.PREV_G], p = l[S + i.PREV_B], m = l[S + i.PREV_A], b = l[S + i.PREV_R2], g = l[S + i.PREV_G2], y = l[S + i.PREV_B2]; var A = l[S], T = this.getCurvePercent(S / i.ENTRIES - 1, 1 - (e - A) / (l[S + i.PREV_TIME] - A)); d += (l[S + i.R] - d) * T, _ += (l[S + i.G] - _) * T, p += (l[S + i.B] - p) * T, m += (l[S + i.A] - m) * T, b += (l[S + i.R2] - b) * T, g += (l[S + i.G2] - g) * T, y += (l[S + i.B2] - y) * T } if (1 == h) a.color.set(d, _, p, m), a.darkColor.set(b, g, y, 1); else { var M = a.color; c = a.darkColor; o == s.bq.setup && (M.setFromColor(a.data.color), c.setFromColor(a.data.darkColor)), M.add((d - M.r) * h, (_ - M.g) * h, (p - M.b) * h, (m - M.a) * h), c.add((b - c.r) * h, (g - c.g) * h, (y - c.b) * h, 0) } } } }, i.ENTRIES = 8, i.PREV_TIME = -8, i.PREV_R = -7, i.PREV_G = -6, i.PREV_B = -5, i.PREV_A = -4, i.PREV_R2 = -3, i.PREV_G2 = -2, i.PREV_B2 = -1, i.R = 1, i.G = 2, i.B = 3, i.A = 4, i.R2 = 5, i.G2 = 6, i.B2 = 7, i }(E), N = function() { function t(t) { this.frames = s.cQ.newFloatArray(t), this.attachmentNames = new Array(t) } return t.prototype.getPropertyId = function() { return (u.attachment << 24) + this.slotIndex }, t.prototype.getFrameCount = function() { return this.frames.length }, t.prototype.setFrame = function(t, i, n) { this.frames[t] = i, this.attachmentNames[t] = n }, t.prototype.apply = function(t, i, n, e, r, h, o) { var u = t.slots[this.slotIndex]; if (u.bone.active) if (o != s.mJ.mixOut) { var a = this.frames; if (n < a[0]) h != s.bq.setup && h != s.bq.first || this.setAttachment(t, u, u.data.attachmentName); else { var l = 0; l = n >= a[a.length - 1] ? a.length - 1 : w.binarySearch(a, n, 1) - 1; var c = this.attachmentNames[l]; t.slots[this.slotIndex].setAttachment(null == c ? null : t.getAttachment(this.slotIndex, c)) } } else h == s.bq.setup && this.setAttachment(t, u, u.data.attachmentName) }, t.prototype.setAttachment = function(t, i, n) { i.setAttachment(null == n ? null : t.getAttachment(this.slotIndex, n)) }, t }(), R = null, P = function(t) { function i(i) { var n = t.call(this, i) || this; return n.frames = s.cQ.newFloatArray(i), n.frameVertices = new Array(i), null == R && (R = s.cQ.newFloatArray(64)), n } return o(i, t), i.prototype.getPropertyId = function() { return +this.attachment.id + (u.deform << 27) + this.slotIndex }, i.prototype.setFrame = function(t, i, n) { this.frames[t] = i, this.frameVertices[t] = n }, i.prototype.apply = function(t, i, n, e, r, h, o) { var u = t.slots[this.slotIndex]; if (u.bone.active) { var a = u.getAttachment(); if (a instanceof c && a.deformAttachment == this.attachment) { var l = u.deform; 0 == l.length && (h = s.bq.setup); var f = this.frameVertices, v = f[0].length, d = this.frames; if (n < d[0]) { var _ = a; switch (h) { case s.bq.setup: return void(l.length = 0); case s.bq.first: if (1 == r) { l.length = 0; break } var p = s.cQ.setArraySize(l, v); if (null == _.bones) for (var m = _.vertices, b = 0; b < v; b++) p[b] += (m[b] - p[b]) * r; else { r = 1 - r; for (b = 0; b < v; b++) p[b] *= r } } } else { var g = s.cQ.setArraySize(l, v); if (n >= d[d.length - 1]) { var y = f[d.length - 1]; if (1 == r) if (h == s.bq.add) if (null == (_ = a).bones) { m = _.vertices; for (var E = 0; E < v; E++) g[E] += y[E] - m[E] } else for (var S = 0; S < v; S++) g[S] += y[S]; else s.cQ.arrayCopy(y, 0, g, 0, v); else switch (h) { case s.bq.setup: if (null == a.bones) { m = a.vertices; for (var A = 0; A < v; A++) { g[A] = (B = m[A]) + (y[A] - B) * r } } else for (var T = 0; T < v; T++) g[T] = y[T] * r; break; case s.bq.first: case s.bq.replace: for (var M = 0; M < v; M++) g[M] += (y[M] - g[M]) * r; break; case s.bq.add: if (null == (_ = a).bones) { m = _.vertices; for (var O = 0; O < v; O++) g[O] += (y[O] - m[O]) * r } else for (var I = 0; I < v; I++) g[I] += y[I] * r } } else { var N = w.binarySearch(d, n), R = f[N - 1], P = f[N], x = d[N], L = this.getCurvePercent(N - 1, 1 - (n - x) / (d[N - 1] - x)); if (1 == r) if (h == s.bq.add) if (null == (_ = a).bones) { m = _.vertices; for (var C = 0; C < v; C++) { g[C] += (H = R[C]) + (P[C] - H) * L - m[C] } } else for (var U = 0; U < v; U++) { g[U] += (H = R[U]) + (P[U] - H) * L } else for (var k = 0; k < v; k++) { g[k] = (H = R[k]) + (P[k] - H) * L } else switch (h) { case s.bq.setup: if (null == a.bones) { m = a.vertices; for (var F = 0; F < v; F++) { var B; g[F] = (B = m[F]) + ((H = R[F]) + (P[F] - H) * L - B) * r } } else for (var D = 0; D < v; D++) { g[D] = ((H = R[D]) + (P[D] - H) * L) * r } break; case s.bq.first: case s.bq.replace: for (var j = 0; j < v; j++) { g[j] += ((H = R[j]) + (P[j] - H) * L - g[j]) * r } break; case s.bq.add: if (null == (_ = a).bones) { m = _.vertices; for (var G = 0; G < v; G++) { g[G] += ((H = R[G]) + (P[G] - H) * L - m[G]) * r } } else for (var W = 0; W < v; W++) { var H; g[W] += ((H = R[W]) + (P[W] - H) * L) * r } } } } } } }, i }(E), x = function() { function t(t) { this.frames = s.cQ.newFloatArray(t), this.events = new Array(t) } return t.prototype.getPropertyId = function() { return u.event << 24 }, t.prototype.getFrameCount = function() { return this.frames.length }, t.prototype.setFrame = function(t, i) { this.frames[t] = i.time, this.events[t] = i }, t.prototype.apply = function(t, i, n, s, e, r, h) { if (null != s) { var o = this.frames, u = this.frames.length; if (i > n) this.apply(t, i, Number.MAX_VALUE, s, e, r, h), i = -1; else if (i >= o[u - 1]) return; if (!(n < o[0])) { var a = 0; if (i < o[0]) a = 0; else for (var l = o[a = w.binarySearch(o, i)]; a > 0 && o[a - 1] == l;) a--; for (; a < u && n >= o[a]; a++) s.push(this.events[a]) } } }, t }(), L = function() { function t(t) { this.frames = s.cQ.newFloatArray(t), this.drawOrders = new Array(t) } return t.prototype.getPropertyId = function() { return u.drawOrder << 24 }, t.prototype.getFrameCount = function() { return this.frames.length }, t.prototype.setFrame = function(t, i, n) { this.frames[t] = i, this.drawOrders[t] = n }, t.prototype.apply = function(t, i, n, e, r, h, o) { var u = t.drawOrder, a = t.slots; if (o != s.mJ.mixOut || h != s.bq.setup) { var l = this.frames; if (n < l[0]) h != s.bq.setup && h != s.bq.first || s.cQ.arrayCopy(t.slots, 0, t.drawOrder, 0, t.slots.length); else { var c = 0; c = n >= l[l.length - 1] ? l.length - 1 : w.binarySearch(l, n) - 1; var f = this.drawOrders[c]; if (null == f) s.cQ.arrayCopy(a, 0, u, 0, a.length); else for (var v = 0, d = f.length; v < d; v++) u[v] = a[f[v]] } } else s.cQ.arrayCopy(t.slots, 0, t.drawOrder, 0, t.slots.length) }, t }(), C = function(t) { function i(n) { var e = t.call(this, n) || this; return e.frames = s.cQ.newFloatArray(n * i.ENTRIES), e } return o(i, t), i.prototype.getPropertyId = function() { return (u.ikConstraint << 24) + this.ikConstraintIndex }, i.prototype.setFrame = function(t, n, s, e, r, h, o) { this.frames[t *= i.ENTRIES] = n, this.frames[t + i.MIX] = s, this.frames[t + i.SOFTNESS] = e, this.frames[t + i.BEND_DIRECTION] = r, this.frames[t + i.COMPRESS] = h ? 1 : 0, this.frames[t + i.STRETCH] = o ? 1 : 0 }, i.prototype.apply = function(t, n, e, r, h, o, u) { var a = this.frames, l = t.ikConstraints[this.ikConstraintIndex]; if (l.active) if (e < a[0]) switch (o) { case s.bq.setup: return l.mix = l.data.mix, l.softness = l.data.softness, l.bendDirection = l.data.bendDirection, l.compress = l.data.compress, void(l.stretch = l.data.stretch); case s.bq.first: l.mix += (l.data.mix - l.mix) * h, l.softness += (l.data.softness - l.softness) * h, l.bendDirection = l.data.bendDirection, l.compress = l.data.compress, l.stretch = l.data.stretch } else if (e >= a[a.length - i.ENTRIES]) o == s.bq.setup ? (l.mix = l.data.mix + (a[a.length + i.PREV_MIX] - l.data.mix) * h, l.softness = l.data.softness + (a[a.length + i.PREV_SOFTNESS] - l.data.softness) * h, u == s.mJ.mixOut ? (l.bendDirection = l.data.bendDirection, l.compress = l.data.compress, l.stretch = l.data.stretch) : (l.bendDirection = a[a.length + i.PREV_BEND_DIRECTION], l.compress = 0 != a[a.length + i.PREV_COMPRESS], l.stretch = 0 != a[a.length + i.PREV_STRETCH])) : (l.mix += (a[a.length + i.PREV_MIX] - l.mix) * h, l.softness += (a[a.length + i.PREV_SOFTNESS] - l.softness) * h, u == s.mJ.mixIn && (l.bendDirection = a[a.length + i.PREV_BEND_DIRECTION], l.compress = 0 != a[a.length + i.PREV_COMPRESS], l.stretch = 0 != a[a.length + i.PREV_STRETCH])); else { var c = w.binarySearch(a, e, i.ENTRIES), f = a[c + i.PREV_MIX], v = a[c + i.PREV_SOFTNESS], d = a[c], _ = this.getCurvePercent(c / i.ENTRIES - 1, 1 - (e - d) / (a[c + i.PREV_TIME] - d)); o == s.bq.setup ? (l.mix = l.data.mix + (f + (a[c + i.MIX] - f) * _ - l.data.mix) * h, l.softness = l.data.softness + (v + (a[c + i.SOFTNESS] - v) * _ - l.data.softness) * h, u == s.mJ.mixOut ? (l.bendDirection = l.data.bendDirection, l.compress = l.data.compress, l.stretch = l.data.stretch) : (l.bendDirection = a[c + i.PREV_BEND_DIRECTION], l.compress = 0 != a[c + i.PREV_COMPRESS], l.stretch = 0 != a[c + i.PREV_STRETCH])) : (l.mix += (f + (a[c + i.MIX] - f) * _ - l.mix) * h, l.softness += (v + (a[c + i.SOFTNESS] - v) * _ - l.softness) * h, u == s.mJ.mixIn && (l.bendDirection = a[c + i.PREV_BEND_DIRECTION], l.compress = 0 != a[c + i.PREV_COMPRESS], l.stretch = 0 != a[c + i.PREV_STRETCH])) } }, i.ENTRIES = 6, i.PREV_TIME = -6, i.PREV_MIX = -5, i.PREV_SOFTNESS = -4, i.PREV_BEND_DIRECTION = -3, i.PREV_COMPRESS = -2, i.PREV_STRETCH = -1, i.MIX = 1, i.SOFTNESS = 2, i.BEND_DIRECTION = 3, i.COMPRESS = 4, i.STRETCH = 5, i }(E), U = function(t) { function i(n) { var e = t.call(this, n) || this; return e.frames = s.cQ.newFloatArray(n * i.ENTRIES), e } return o(i, t), i.prototype.getPropertyId = function() { return (u.transformConstraint << 24) + this.transformConstraintIndex }, i.prototype.setFrame = function(t, n, s, e, r, h) { this.frames[t *= i.ENTRIES] = n, this.frames[t + i.ROTATE] = s, this.frames[t + i.TRANSLATE] = e, this.frames[t + i.SCALE] = r, this.frames[t + i.SHEAR] = h }, i.prototype.apply = function(t, n, e, r, h, o, u) { var a = this.frames, l = t.transformConstraints[this.transformConstraintIndex]; if (l.active) if (e < a[0]) { var c = l.data; switch (o) { case s.bq.setup: return l.rotateMix = c.rotateMix, l.translateMix = c.translateMix, l.scaleMix = c.scaleMix, void(l.shearMix = c.shearMix); case s.bq.first: l.rotateMix += (c.rotateMix - l.rotateMix) * h, l.translateMix += (c.translateMix - l.translateMix) * h, l.scaleMix += (c.scaleMix - l.scaleMix) * h, l.shearMix += (c.shearMix - l.shearMix) * h } } else { var f = 0, v = 0, d = 0, _ = 0; if (e >= a[a.length - i.ENTRIES]) { var p = a.length; f = a[p + i.PREV_ROTATE], v = a[p + i.PREV_TRANSLATE], d = a[p + i.PREV_SCALE], _ = a[p + i.PREV_SHEAR] } else { var m = w.binarySearch(a, e, i.ENTRIES); f = a[m + i.PREV_ROTATE], v = a[m + i.PREV_TRANSLATE], d = a[m + i.PREV_SCALE], _ = a[m + i.PREV_SHEAR]; var b = a[m], g = this.getCurvePercent(m / i.ENTRIES - 1, 1 - (e - b) / (a[m + i.PREV_TIME] - b)); f += (a[m + i.ROTATE] - f) * g, v += (a[m + i.TRANSLATE] - v) * g, d += (a[m + i.SCALE] - d) * g, _ += (a[m + i.SHEAR] - _) * g } if (o == s.bq.setup) l.rotateMix = (c = l.data).rotateMix + (f - c.rotateMix) * h, l.translateMix = c.translateMix + (v - c.translateMix) * h, l.scaleMix = c.scaleMix + (d - c.scaleMix) * h, l.shearMix = c.shearMix + (_ - c.shearMix) * h; else l.rotateMix += (f - l.rotateMix) * h, l.translateMix += (v - l.translateMix) * h, l.scaleMix += (d - l.scaleMix) * h, l.shearMix += (_ - l.shearMix) * h } }, i.ENTRIES = 5, i.PREV_TIME = -5, i.PREV_ROTATE = -4, i.PREV_TRANSLATE = -3, i.PREV_SCALE = -2, i.PREV_SHEAR = -1, i.ROTATE = 1, i.TRANSLATE = 2, i.SCALE = 3, i.SHEAR = 4, i }(E), k = function(t) { function i(n) { var e = t.call(this, n) || this; return e.frames = s.cQ.newFloatArray(n * i.ENTRIES), e } return o(i, t), i.prototype.getPropertyId = function() { return (u.pathConstraintPosition << 24) + this.pathConstraintIndex }, i.prototype.setFrame = function(t, n, s) { this.frames[t *= i.ENTRIES] = n, this.frames[t + i.VALUE] = s }, i.prototype.apply = function(t, n, e, r, h, o, u) { var a = this.frames, l = t.pathConstraints[this.pathConstraintIndex]; if (l.active) if (e < a[0]) switch (o) { case s.bq.setup: return void(l.position = l.data.position); case s.bq.first: l.position += (l.data.position - l.position) * h } else { var c = 0; if (e >= a[a.length - i.ENTRIES]) c = a[a.length + i.PREV_VALUE]; else { var f = w.binarySearch(a, e, i.ENTRIES); c = a[f + i.PREV_VALUE]; var v = a[f], d = this.getCurvePercent(f / i.ENTRIES - 1, 1 - (e - v) / (a[f + i.PREV_TIME] - v)); c += (a[f + i.VALUE] - c) * d } o == s.bq.setup ? l.position = l.data.position + (c - l.data.position) * h : l.position += (c - l.position) * h } }, i.ENTRIES = 2, i.PREV_TIME = -2, i.PREV_VALUE = -1, i.VALUE = 1, i }(E), F = function(t) { function i(i) { return t.call(this, i) || this } return o(i, t), i.prototype.getPropertyId = function() { return (u.pathConstraintSpacing << 24) + this.pathConstraintIndex }, i.prototype.apply = function(t, n, e, r, h, o, u) { var a = this.frames, l = t.pathConstraints[this.pathConstraintIndex]; if (l.active) if (e < a[0]) switch (o) { case s.bq.setup: return void(l.spacing = l.data.spacing); case s.bq.first: l.spacing += (l.data.spacing - l.spacing) * h } else { var c = 0; if (e >= a[a.length - i.ENTRIES]) c = a[a.length + i.PREV_VALUE]; else { var f = w.binarySearch(a, e, i.ENTRIES); c = a[f + i.PREV_VALUE]; var v = a[f], d = this.getCurvePercent(f / i.ENTRIES - 1, 1 - (e - v) / (a[f + i.PREV_TIME] - v)); c += (a[f + i.VALUE] - c) * d } o == s.bq.setup ? l.spacing = l.data.spacing + (c - l.data.spacing) * h : l.spacing += (c - l.spacing) * h } }, i }(k), B = function(t) { function i(n) { var e = t.call(this, n) || this; return e.frames = s.cQ.newFloatArray(n * i.ENTRIES), e } return o(i, t), i.prototype.getPropertyId = function() { return (u.pathConstraintMix << 24) + this.pathConstraintIndex }, i.prototype.setFrame = function(t, n, s, e) { this.frames[t *= i.ENTRIES] = n, this.frames[t + i.ROTATE] = s, this.frames[t + i.TRANSLATE] = e }, i.prototype.apply = function(t, n, e, r, h, o, u) { var a = this.frames, l = t.pathConstraints[this.pathConstraintIndex]; if (l.active) if (e < a[0]) switch (o) { case s.bq.setup: return l.rotateMix = l.data.rotateMix, void(l.translateMix = l.data.translateMix); case s.bq.first: l.rotateMix += (l.data.rotateMix - l.rotateMix) * h, l.translateMix += (l.data.translateMix - l.translateMix) * h } else { var c = 0, f = 0; if (e >= a[a.length - i.ENTRIES]) c = a[a.length + i.PREV_ROTATE], f = a[a.length + i.PREV_TRANSLATE]; else { var v = w.binarySearch(a, e, i.ENTRIES); c = a[v + i.PREV_ROTATE], f = a[v + i.PREV_TRANSLATE]; var d = a[v], _ = this.getCurvePercent(v / i.ENTRIES - 1, 1 - (e - d) / (a[v + i.PREV_TIME] - d)); c += (a[v + i.ROTATE] - c) * _, f += (a[v + i.TRANSLATE] - f) * _ } o == s.bq.setup ? (l.rotateMix = l.data.rotateMix + (c - l.data.rotateMix) * h, l.translateMix = l.data.translateMix + (f - l.data.translateMix) * h) : (l.rotateMix += (c - l.rotateMix) * h, l.translateMix += (f - l.translateMix) * h) } }, i.ENTRIES = 3, i.PREV_TIME = -3, i.PREV_ROTATE = -2, i.PREV_TRANSLATE = -1, i.ROTATE = 1, i.TRANSLATE = 2, i }(E), D = function() { function t(t) { this.tracks = new Array, this.timeScale = 1, this.unkeyedState = 0, this.events = new Array, this.listeners = new Array, this.queue = new G(this), this.propertyIDs = new s.JS, this.animationsChanged = !1, this.trackEntryPool = new s.Kg((function() { return new j })), this.data = t } return t.prototype.update = function(t) { t *= this.timeScale; for (var i = this.tracks, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (null != e) { e.animationLast = e.nextAnimationLast, e.trackLast = e.nextTrackLast; var r = t * e.timeScale; if (e.delay > 0) { if (e.delay -= r, e.delay > 0) continue; r = -e.delay, e.delay = 0 } var h = e.next; if (null != h) { var o = e.trackLast - h.delay; if (o >= 0) { for (h.delay = 0, h.trackTime += 0 == e.timeScale ? 0 : (o / e.timeScale + t) * h.timeScale, e.trackTime += r, this.setCurrent(n, h, !0); null != h.mixingFrom;) h.mixTime += t, h = h.mixingFrom; continue } } else if (e.trackLast >= e.trackEnd && null == e.mixingFrom) { i[n] = null, this.queue.end(e), this.disposeNext(e); continue } if (null != e.mixingFrom && this.updateMixingFrom(e, t)) { var u = e.mixingFrom; for (e.mixingFrom = null, null != u && (u.mixingTo = null); null != u;) this.queue.end(u), u = u.mixingFrom } e.trackTime += r } } this.queue.drain() }, t.prototype.updateMixingFrom = function(t, i) { var n = t.mixingFrom; if (null == n) return !0; var s = this.updateMixingFrom(n, i); return n.animationLast = n.nextAnimationLast, n.trackLast = n.nextTrackLast, t.mixTime > 0 && t.mixTime >= t.mixDuration ? (0 != n.totalAlpha && 0 != t.mixDuration || (t.mixingFrom = n.mixingFrom, null != n.mixingFrom && (n.mixingFrom.mixingTo = t), t.interruptAlpha = n.interruptAlpha, this.queue.end(n)), s) : (n.trackTime += i * n.timeScale, t.mixTime += i, !1) }, t.prototype.apply = function(i) { if (null == i) throw new Error("skeleton cannot be null."); this.animationsChanged && this.k(); for (var n = this.events, e = this.tracks, r = !1, h = 0, o = e.length; h < o; h++) { var u = e[h]; if (!(null == u || u.delay > 0)) { r = !0; var a = 0 == h ? s.bq.first : u.mixBlend, l = u.alpha; null != u.mixingFrom ? l *= this.applyMixingFrom(u, i, a) : u.trackTime >= u.trackEnd && null == u.next && (l = 0); var c = u.animationLast, f = u.getAnimationTime(), v = u.animation.timelines.length, d = u.animation.timelines; if (0 == h && 1 == l || a == s.bq.add) for (var _ = 0; _ < v; _++) { s.cQ.webkit602BugfixHelper(l, a); var p = d[_]; p instanceof N ? this.applyAttachmentTimeline(p, i, f, a, !0) : p.apply(i, c, f, n, l, a, s.mJ.mixIn) } else { var m = u.timelineMode, b = 0 == u.timelinesRotation.length; b && s.cQ.setArraySize(u.timelinesRotation, v << 1, null); var w = u.timelinesRotation; for (_ = 0; _ < v; _++) { var g = d[_], y = m[_] == t.SUBSEQUENT ? a : s.bq.setup; g instanceof S ? this.applyRotateTimeline(g, i, f, l, y, w, _ << 1, b) : g instanceof N ? this.applyAttachmentTimeline(g, i, f, a, !0) : (s.cQ.webkit602BugfixHelper(l, a), g.apply(i, c, f, n, l, y, s.mJ.mixIn)) } } this.queueEvents(u, f), n.length = 0, u.nextAnimationLast = f, u.nextTrackLast = u.trackTime } } for (var E = this.unkeyedState + t.SETUP, A = i.slots, T = 0, M = i.slots.length; T < M; T++) { var O = A[T]; if (O.attachmentState == E) { var I = O.data.attachmentName; O.setAttachment(null == I ? null : i.getAttachment(O.data.index, I)) } } return this.unkeyedState += 2, this.queue.drain(), r }, t.prototype.applyMixingFrom = function(i, n, e) { var r = i.mixingFrom; null != r.mixingFrom && this.applyMixingFrom(r, n, e); var h = 0; 0 == i.mixDuration ? (h = 1, e == s.bq.first && (e = s.bq.setup)) : ((h = i.mixTime / i.mixDuration) > 1 && (h = 1), e != s.bq.first && (e = r.mixBlend)); var o = h < r.eventThreshold ? this.events : null, u = h < r.attachmentThreshold, a = h < r.drawOrderThreshold, l = r.animationLast, c = r.getAnimationTime(), f = r.animation.timelines.length, v = r.animation.timelines, d = r.alpha * i.interruptAlpha, _ = d * (1 - h); if (e == s.bq.add) for (var p = 0; p < f; p++) v[p].apply(n, l, c, o, _, e, s.mJ.mixOut); else { var m = r.timelineMode, b = r.timelineHoldMix, w = 0 == r.timelinesRotation.length; w && s.cQ.setArraySize(r.timelinesRotation, f << 1, null); var g = r.timelinesRotation; r.totalAlpha = 0; for (p = 0; p < f; p++) { var y = v[p], E = s.mJ.mixOut, A = void 0, T = 0; switch (m[p]) { case t.SUBSEQUENT: if (!a && y instanceof L) continue; A = e, T = _; break; case t.FIRST: A = s.bq.setup, T = _; break; case t.HOLD_SUBSEQUENT: A = e, T = d; break; case t.HOLD_FIRST: A = s.bq.setup, T = d; break; default: A = s.bq.setup; var M = b[p]; T = d * Math.max(0, 1 - M.mixTime / M.mixDuration) } r.totalAlpha += T, y instanceof S ? this.applyRotateTimeline(y, n, c, T, A, g, p << 1, w) : y instanceof N ? this.applyAttachmentTimeline(y, n, c, A, u) : (s.cQ.webkit602BugfixHelper(T, e), a && y instanceof L && A == s.bq.setup && (E = s.mJ.mixIn), y.apply(n, l, c, o, T, A, E)) } } return i.mixDuration > 0 && this.queueEvents(r, c), this.events.length = 0, r.nextAnimationLast = c, r.nextTrackLast = r.trackTime, h }, t.prototype.applyAttachmentTimeline = function(i, n, e, r, h) { var o = n.slots[i.slotIndex]; if (o.bone.active) { var u, a = i.frames; if (e < a[0]) r != s.bq.setup && r != s.bq.first || this.setAttachment(n, o, o.data.attachmentName, h); else u = e >= a[a.length - 1] ? a.length - 1 : w.binarySearch(a, e) - 1, this.setAttachment(n, o, i.attachmentNames[u], h); o.attachmentState <= this.unkeyedState && (o.attachmentState = this.unkeyedState + t.SETUP) } }, t.prototype.setAttachment = function(i, n, s, e) { n.setAttachment(null == s ? null : i.getAttachment(n.data.index, s)), e && (n.attachmentState = this.unkeyedState + t.CURRENT) }, t.prototype.applyRotateTimeline = function(t, i, n, e, r, h, o, u) { if (u && (h[o] = 0), 1 != e) { var a = t, l = a.frames, c = i.bones[a.boneIndex]; if (c.active) { var f = 0, v = 0; if (n < l[0]) switch (r) { case s.bq.setup: c.rotation = c.data.rotation; default: return; case s.bq.first: f = c.rotation, v = c.data.rotation } else if (f = r == s.bq.setup ? c.data.rotation : c.rotation, n >= l[l.length - S.ENTRIES]) v = c.data.rotation + l[l.length + S.PREV_ROTATION]; else { var d = w.binarySearch(l, n, S.ENTRIES), _ = l[d + S.PREV_ROTATION], p = l[d], m = a.getCurvePercent((d >> 1) - 1, 1 - (n - p) / (l[d + S.PREV_TIME] - p)); v = l[d + S.ROTATION] - _, v = _ + (v -= 360 * (16384 - (16384.499999999996 - v / 360 | 0))) * m + c.data.rotation, v -= 360 * (16384 - (16384.499999999996 - v / 360 | 0)) } var b = 0, g = v - f; if (0 == (g -= 360 * (16384 - (16384.499999999996 - g / 360 | 0)))) b = h[o]; else { var y = 0, E = 0; u ? (y = 0, E = g) : (y = h[o], E = h[o + 1]); var A = g > 0, T = y >= 0; s.M8.signum(E) != s.M8.signum(g) && Math.abs(E) <= 90 && (Math.abs(y) > 180 && (y += 360 * s.M8.signum(y)), T = A), b = g + y - y % 360, T != A && (b += 360 * s.M8.signum(y)), h[o] = b } h[o + 1] = g, c.rotation = (f += b * e) - 360 * (16384 - (16384.499999999996 - f / 360 | 0)) } } else t.apply(i, 0, n, null, 1, r, s.mJ.mixIn) }, t.prototype.queueEvents = function(t, i) { for (var n = t.animationStart, s = t.animationEnd, e = s - n, r = t.trackLast % e, h = this.events, o = 0, u = h.length; o < u; o++) { var a = h[o]; if (a.time < r) break; a.time > s || this.queue.event(t, a) } for ((t.loop ? 0 == e || r > t.trackTime % e : i >= s && t.animationLast < s) && this.queue.complete(t); o < u; o++) { h[o].time < n || this.queue.event(t, h[o]) } }, t.prototype.clearTracks = function() { var t = this.queue.drainDisabled; this.queue.drainDisabled = !0; for (var i = 0, n = this.tracks.length; i < n; i++) this.clearTrack(i); this.tracks.length = 0, this.queue.drainDisabled = t, this.queue.drain() }, t.prototype.clearTrack = function(t) { if (!(t >= this.tracks.length)) { var i = this.tracks[t]; if (null != i) { this.queue.end(i), this.disposeNext(i); for (var n = i;;) { var s = n.mixingFrom; if (null == s) break; this.queue.end(s), n.mixingFrom = null, n.mixingTo = null, n = s } this.tracks[i.trackIndex] = null, this.queue.drain() } } }, t.prototype.setCurrent = function(t, i, n) { var s = this.expandToIndex(t); this.tracks[t] = i, null != s && (n && this.queue.interrupt(s), i.mixingFrom = s, s.mixingTo = i, i.mixTime = 0, null != s.mixingFrom && s.mixDuration > 0 && (i.interruptAlpha *= Math.min(1, s.mixTime / s.mixDuration)), s.timelinesRotation.length = 0), this.queue.start(i) }, t.prototype.setAnimation = function(t, i, n) { var s = this.data.skeletonData.findAnimation(i); if (null == s) throw new Error("Animation not found: " + i); return this.setAnimationWith(t, s, n) }, t.prototype.setAnimationWith = function(t, i, n) { if (null == i) throw new Error("animation cannot be null."); var s = !0, e = this.expandToIndex(t); null != e && (-1 == e.nextTrackLast ? (this.tracks[t] = e.mixingFrom, this.queue.interrupt(e), this.queue.end(e), this.disposeNext(e), e = e.mixingFrom, s = !1) : this.disposeNext(e)); var r = this.trackEntry(t, i, n, e); return this.setCurrent(t, r, s), this.queue.drain(), r }, t.prototype.addAnimation = function(t, i, n, s) { var e = this.data.skeletonData.findAnimation(i); if (null == e) throw new Error("Animation not found: " + i); return this.addAnimationWith(t, e, n, s) }, t.prototype.addAnimationWith = function(t, i, n, s) { if (null == i) throw new Error("animation cannot be null."); var e = this.expandToIndex(t); if (null != e) for (; null != e.next;) e = e.next; var r = this.trackEntry(t, i, n, e); if (null == e) this.setCurrent(t, r, !0), this.queue.drain(); else if (e.next = r, s <= 0) { var h = e.animationEnd - e.animationStart; 0 != h ? (s += e.loop ? h * (1 + (e.trackTime / h | 0)) : Math.max(h, e.trackTime), s -= this.data.getMix(e.animation, i)) : s = e.trackTime } return r.delay = s, r }, t.prototype.setEmptyAnimation = function(i, n) { var s = this.setAnimationWith(i, t.emptyAnimation, !1); return s.mixDuration = n, s.trackEnd = n, s }, t.prototype.addEmptyAnimation = function(i, n, s) { s <= 0 && (s -= n); var e = this.addAnimationWith(i, t.emptyAnimation, !1, s); return e.mixDuration = n, e.trackEnd = n, e }, t.prototype.setEmptyAnimations = function(t) { var i = this.queue.drainDisabled; this.queue.drainDisabled = !0; for (var n = 0, s = this.tracks.length; n < s; n++) { var e = this.tracks[n]; null != e && this.setEmptyAnimation(e.trackIndex, t) } this.queue.drainDisabled = i, this.queue.drain() }, t.prototype.expandToIndex = function(t) { return t < this.tracks.length ? this.tracks[t] : (s.cQ.ensureArrayCapacity(this.tracks, t + 1, null), this.tracks.length = t + 1, null) }, t.prototype.trackEntry = function(t, i, n, e) { var r = this.trackEntryPool.obtain(); return r.trackIndex = t, r.animation = i, r.loop = n, r.holdPrevious = !1, r.eventThreshold = 0, r.attachmentThreshold = 0, r.drawOrderThreshold = 0, r.animationStart = 0, r.animationEnd = i.duration, r.animationLast = -1, r.nextAnimationLast = -1, r.delay = 0, r.trackTime = 0, r.trackLast = -1, r.nextTrackLast = -1, r.trackEnd = Number.MAX_VALUE, r.timeScale = 1, r.alpha = 1, r.interruptAlpha = 1, r.mixTime = 0, r.mixDuration = null == e ? 0 : this.data.getMix(e.animation, i), r.mixBlend = s.bq.replace, r }, t.prototype.disposeNext = function(t) { for (var i = t.next; null != i;) this.queue.dispose(i), i = i.next; t.next = null }, t.prototype.k = function() { this.animationsChanged = !1, this.propertyIDs.clear(); for (var t = 0, i = this.tracks.length; t < i; t++) { var n = this.tracks[t]; if (null != n) { for (; null != n.mixingFrom;) n = n.mixingFrom; do { null != n.mixingFrom && n.mixBlend == s.bq.add || this.computeHold(n), n = n.mixingTo } while (null != n) } } }, t.prototype.computeHold = function(i) { var n = i.mixingTo, e = i.animation.timelines, r = i.animation.timelines.length, h = s.cQ.setArraySize(i.timelineMode, r); i.timelineHoldMix.length = 0; var o = s.cQ.setArraySize(i.timelineHoldMix, r), u = this.propertyIDs; if (null != n && n.holdPrevious) for (var a = 0; a < r; a++) h[a] = u.add(e[a].getPropertyId()) ? t.HOLD_FIRST : t.HOLD_SUBSEQUENT; else t: for (a = 0; a < r; a++) { var l = e[a], c = l.getPropertyId(); if (u.add(c)) if (null == n || l instanceof N || l instanceof L || l instanceof x || !n.animation.hasTimeline(c)) h[a] = t.FIRST; else { for (var f = n.mixingTo; null != f; f = f.mixingTo) if (!f.animation.hasTimeline(c)) { if (i.mixDuration > 0) { h[a] = t.HOLD_MIX, o[a] = f; continue t } break } h[a] = t.HOLD_FIRST } else h[a] = t.SUBSEQUENT } }, t.prototype.getCurrent = function(t) { return t >= this.tracks.length ? null : this.tracks[t] }, t.prototype.addListener = function(t) { if (null == t) throw new Error("listener cannot be null."); this.listeners.push(t) }, t.prototype.removeListener = function(t) { var i = this.listeners.indexOf(t); i >= 0 && this.listeners.splice(i, 1) }, t.prototype.clearListeners = function() { this.listeners.length = 0 }, t.prototype.clearListenerNotifications = function() { this.queue.clear() }, t.prototype.setAnimationByName = function(i, n, s) { t.deprecatedWarning1 || (t.deprecatedWarning1 = !0), this.setAnimation(i, n, s) }, t.prototype.addAnimationByName = function(i, n, s, e) { t.deprecatedWarning2 || (t.deprecatedWarning2 = !0), this.addAnimation(i, n, s, e) }, t.prototype.hasAnimation = function(t) { return null !== this.data.skeletonData.findAnimation(t) }, t.prototype.hasAnimationByName = function(i) { return t.deprecatedWarning3 || (t.deprecatedWarning3 = !0), this.hasAnimation(i) }, t.emptyAnimation = new w("", [], 0), t.SUBSEQUENT = 0, t.FIRST = 1, t.HOLD_SUBSEQUENT = 2, t.HOLD_FIRST = 3, t.HOLD_MIX = 4, t.SETUP = 1, t.CURRENT = 2, t.deprecatedWarning1 = !1, t.deprecatedWarning2 = !1, t.deprecatedWarning3 = !1, t }(), j = function() { function t() { this.mixBlend = s.bq.replace, this.timelineMode = new Array, this.timelineHoldMix = new Array, this.timelinesRotation = new Array } return t.prototype.reset = function() { this.next = null, this.mixingFrom = null, this.mixingTo = null, this.animation = null, this.listener = null, this.timelineMode.length = 0, this.timelineHoldMix.length = 0, this.timelinesRotation.length = 0 }, t.prototype.getAnimationTime = function() { if (this.loop) { var t = this.animationEnd - this.animationStart; return 0 == t ? this.animationStart : this.trackTime % t + this.animationStart } return Math.min(this.trackTime + this.animationStart, this.animationEnd) }, t.prototype.setAnimationLast = function(t) { this.animationLast = t, this.nextAnimationLast = t }, t.prototype.isComplete = function() { return this.trackTime >= this.animationEnd - this.animationStart }, t.prototype.resetRotationDirections = function() { this.timelinesRotation.length = 0 }, Object.defineProperty(t.prototype, "time", { get: function() { return t.deprecatedWarning1 || (t.deprecatedWarning1 = !0), this.trackTime }, set: function(i) { t.deprecatedWarning1 || (t.deprecatedWarning1 = !0), this.trackTime = i }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "endTime", { get: function() { return t.deprecatedWarning2 || (t.deprecatedWarning2 = !0), this.trackTime }, set: function(i) { t.deprecatedWarning2 || (t.deprecatedWarning2 = !0), this.trackTime = i }, enumerable: !1, configurable: !0 }), t.prototype.loopsCount = function() { return Math.floor(this.trackTime / this.trackEnd) }, t.deprecatedWarning1 = !1, t.deprecatedWarning2 = !1, t }(), G = function() { function t(t) { this.objects = [], this.drainDisabled = !1, this.animState = t } return t.prototype.start = function(t) { this.objects.push(g.start), this.objects.push(t), this.animState.animationsChanged = !0 }, t.prototype.interrupt = function(t) { this.objects.push(g.interrupt), this.objects.push(t) }, t.prototype.end = function(t) { this.objects.push(g.end), this.objects.push(t), this.animState.animationsChanged = !0 }, t.prototype.dispose = function(t) { this.objects.push(g.dispose), this.objects.push(t) }, t.prototype.complete = function(t) { this.objects.push(g.complete), this.objects.push(t) }, t.prototype.event = function(t, i) { this.objects.push(g.event), this.objects.push(t), this.objects.push(i) }, t.prototype.deprecateStuff = function() { return t.deprecatedWarning1 || (t.deprecatedWarning1 = !0), !0 }, t.prototype.drain = function() { if (!this.drainDisabled) { this.drainDisabled = !0; for (var t = this.objects, i = this.animState.listeners, n = 0; n < t.length; n += 2) { var e = t[n + 1]; switch (t[n]) { case g.start: null != e.listener && e.listener.start && e.listener.start(e); for (var r = 0; r < i.length; r++) i[r].start && i[r].start(e); e.onStart && this.deprecateStuff() && e.onStart(e.trackIndex), this.animState.onStart && this.deprecateStuff() && this.deprecateStuff && this.animState.onStart(e.trackIndex); break; case g.interrupt: null != e.listener && e.listener.interrupt && e.listener.interrupt(e); for (r = 0; r < i.length; r++) i[r].interrupt && i[r].interrupt(e); break; case g.end: null != e.listener && e.listener.end && e.listener.end(e); for (r = 0; r < i.length; r++) i[r].end && i[r].end(e); e.onEnd && this.deprecateStuff() && e.onEnd(e.trackIndex), this.animState.onEnd && this.deprecateStuff() && this.animState.onEnd(e.trackIndex); case g.dispose: null != e.listener && e.listener.dispose && e.listener.dispose(e); for (r = 0; r < i.length; r++) i[r].dispose && i[r].dispose(e); this.animState.trackEntryPool.free(e); break; case g.complete: null != e.listener && e.listener.complete && e.listener.complete(e); for (r = 0; r < i.length; r++) i[r].complete && i[r].complete(e); var h = s.M8.toInt(e.loopsCount()); e.onComplete && this.deprecateStuff() && e.onComplete(e.trackIndex, h), this.animState.onComplete && this.deprecateStuff() && this.animState.onComplete(e.trackIndex, h); break; case g.event: var o = t[2 + n++]; null != e.listener && e.listener.event && e.listener.event(e, o); for (r = 0; r < i.length; r++) i[r].event && i[r].event(e, o); e.onEvent && this.deprecateStuff() && e.onEvent(e.trackIndex, o), this.animState.onEvent && this.deprecateStuff() && this.animState.onEvent(e.trackIndex, o) } } this.clear(), this.drainDisabled = !1 } }, t.prototype.clear = function() { this.objects.length = 0 }, t.deprecatedWarning1 = !1, t }(); (y = g || (g = {}))[y.start = 0] = "start", y[y.interrupt = 1] = "interrupt", y[y.end = 2] = "end", y[y.dispose = 3] = "dispose", y[y.complete = 4] = "complete", y[y.event = 5] = "event"; ! function() { function t() {} t.prototype.start = function(t) {}, t.prototype.interrupt = function(t) {}, t.prototype.end = function(t) {}, t.prototype.dispose = function(t) {}, t.prototype.complete = function(t) {}, t.prototype.event = function(t, i) {} }(); var W, H, X = function() { function t(t) { if (this.animationToMixTime = {}, this.defaultMix = 0, null == t) throw new Error("skeletonData cannot be null."); this.skeletonData = t } return t.prototype.setMix = function(t, i, n) { var s = this.skeletonData.findAnimation(t); if (null == s) throw new Error("Animation not found: " + t); var e = this.skeletonData.findAnimation(i); if (null == e) throw new Error("Animation not found: " + i); this.setMixWith(s, e, n) }, t.prototype.setMixByName = function(i, n, s) { t.deprecatedWarning1 || (t.deprecatedWarning1 = !0), this.setMix(i, n, s) }, t.prototype.setMixWith = function(t, i, n) { if (null == t) throw new Error("from cannot be null."); if (null == i) throw new Error("to cannot be null."); this.animationToMixTime[t.name + "." + i.name] = n }, t.prototype.getMix = function(t, i) { var n = this.animationToMixTime[t.name + "." + i.name]; return void 0 === n ? this.defaultMix : n }, t.deprecatedWarning1 = !1, t }(), V = function() { function t(t) { this.atlas = t } return t.prototype.newRegionAttachment = function(t, i, n) { var s = this.atlas.findRegion(n); if (null == s) throw new Error("Region not found in atlas: " + n + " (region attachment: " + i + ")"); var e = new b(i); return e.region = s, e }, t.prototype.newMeshAttachment = function(t, i, n) { var s = this.atlas.findRegion(n); if (null == s) throw new Error("Region not found in atlas: " + n + " (mesh attachment: " + i + ")"); var e = new d(i); return e.region = s, e }, t.prototype.newBoundingBoxAttachment = function(t, i) { return new f(i) }, t.prototype.newPathAttachment = function(t, i) { return new _(i) }, t.prototype.newPointAttachment = function(t, i) { return new p(i) }, t.prototype.newClippingAttachment = function(t, i) { return new v(i) }, t }(), $ = function() { function t(t, i, n) { if (this.matrix = new e.y3, this.children = new Array, this.x = 0, this.y = 0, this.rotation = 0, this.scaleX = 0, this.scaleY = 0, this.shearX = 0, this.shearY = 0, this.ax = 0, this.ay = 0, this.arotation = 0, this.ascaleX = 0, this.ascaleY = 0, this.ashearX = 0, this.ashearY = 0, this.appliedValid = !1, this.sorted = !1, this.active = !1, null == t) throw new Error("data cannot be null."); if (null == i) throw new Error("skeleton cannot be null."); this.data = t, this.skeleton = i, this.parent = n, this.setToSetupPose() } return Object.defineProperty(t.prototype, "worldX", { get: function() { return this.matrix.tx }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "worldY", { get: function() { return this.matrix.ty }, enumerable: !1, configurable: !0 }), t.prototype.isActive = function() { return this.active }, t.prototype.update = function() { this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY) }, t.prototype.updateWorldTransform = function() { this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY) }, t.prototype.updateWorldTransformWith = function(t, i, n, e, r, h, o) { this.ax = t, this.ay = i, this.arotation = n, this.ascaleX = e, this.ascaleY = r, this.ashearX = h, this.ashearY = o, this.appliedValid = !0; var u = this.parent, a = this.matrix, l = this.skeleton.scaleX, c = s.Xd.yDown ? -this.skeleton.scaleY : this.skeleton.scaleY; if (null == u) { var f = this.skeleton, v = n + 90 + o; return a.a = s.M8.cosDeg(n + h) * e * l, a.c = s.M8.cosDeg(v) * r * l, a.b = s.M8.sinDeg(n + h) * e * c, a.d = s.M8.sinDeg(v) * r * c, a.tx = t * l + f.x, void(a.ty = i * c + f.y) } var d = u.matrix.a, _ = u.matrix.c, p = u.matrix.b, m = u.matrix.d; switch (a.tx = d * t + _ * i + u.matrix.tx, a.ty = p * t + m * i + u.matrix.ty, this.data.transformMode) { case s.Qe.Normal: v = n + 90 + o; var b = s.M8.cosDeg(n + h) * e, w = s.M8.cosDeg(v) * r, g = s.M8.sinDeg(n + h) * e, y = s.M8.sinDeg(v) * r; return a.a = d * b + _ * g, a.c = d * w + _ * y, a.b = p * b + m * g, void(a.d = p * w + m * y); case s.Qe.OnlyTranslation: v = n + 90 + o; a.a = s.M8.cosDeg(n + h) * e, a.c = s.M8.cosDeg(v) * r, a.b = s.M8.sinDeg(n + h) * e, a.d = s.M8.sinDeg(v) * r; break; case s.Qe.NoRotationOrReflection: var E = 0; (T = d * d + p * p) > 1e-4 ? (T = Math.abs(d * m - _ * p) / T, _ = (p /= this.skeleton.scaleY) * T, m = (d /= this.skeleton.scaleX) * T, E = Math.atan2(p, d) * s.M8.radDeg) : (d = 0, p = 0, E = 90 - Math.atan2(m, _) * s.M8.radDeg); var S = n + h - E, A = n + o - E + 90; b = s.M8.cosDeg(S) * e, w = s.M8.cosDeg(A) * r, g = s.M8.sinDeg(S) * e, y = s.M8.sinDeg(A) * r; a.a = d * b - _ * g, a.c = d * w - _ * y, a.b = p * b + m * g, a.d = p * w + m * y; break; case s.Qe.NoScale: case s.Qe.NoScaleOrReflection: var T, M = s.M8.cosDeg(n), O = s.M8.sinDeg(n), I = (d * M + _ * O) / l, N = (p * M + m * O) / c; (T = Math.sqrt(I * I + N * N)) > 1e-5 && (T = 1 / T), I *= T, N *= T, T = Math.sqrt(I * I + N * N), this.data.transformMode == s.Qe.NoScale && d * m - _ * p < 0 != (s.Xd.yDown ? this.skeleton.scaleX < 0 != this.skeleton.scaleY > 0 : this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0) && (T = -T); var R = Math.PI / 2 + Math.atan2(N, I), P = Math.cos(R) * T, x = Math.sin(R) * T; b = s.M8.cosDeg(h) * e, w = s.M8.cosDeg(90 + o) * r, g = s.M8.sinDeg(h) * e, y = s.M8.sinDeg(90 + o) * r; a.a = I * b + P * g, a.c = I * w + P * y, a.b = N * b + x * g, a.d = N * w + x * y } a.a *= l, a.c *= l, a.b *= c, a.d *= c }, t.prototype.setToSetupPose = function() { var t = this.data; this.x = t.x, this.y = t.y, this.rotation = t.rotation, this.scaleX = t.scaleX, this.scaleY = t.scaleY, this.shearX = t.shearX, this.shearY = t.shearY }, t.prototype.getWorldRotationX = function() { return Math.atan2(this.matrix.b, this.matrix.a) * s.M8.radDeg }, t.prototype.getWorldRotationY = function() { return Math.atan2(this.matrix.d, this.matrix.c) * s.M8.radDeg }, t.prototype.getWorldScaleX = function() { var t = this.matrix; return Math.sqrt(t.a * t.a + t.c * t.c) }, t.prototype.getWorldScaleY = function() { var t = this.matrix; return Math.sqrt(t.b * t.b + t.d * t.d) }, t.prototype.updateAppliedTransform = function() { this.appliedValid = !0; var t = this.parent, i = this.matrix; if (null == t) return this.ax = i.tx, this.ay = i.ty, this.arotation = Math.atan2(i.b, i.a) * s.M8.radDeg, this.ascaleX = Math.sqrt(i.a * i.a + i.b * i.b), this.ascaleY = Math.sqrt(i.c * i.c + i.d * i.d), this.ashearX = 0, void(this.ashearY = Math.atan2(i.a * i.c + i.b * i.d, i.a * i.d - i.b * i.c) * s.M8.radDeg); var n = t.matrix, e = 1 / (n.a * n.d - n.b * n.c), r = i.tx - n.tx, h = i.ty - n.ty; this.ax = r * n.d * e - h * n.c * e, this.ay = h * n.a * e - r * n.b * e; var o = e * n.d, u = e * n.a, a = e * n.c, l = e * n.b, c = o * i.a - a * i.b, f = o * i.c - a * i.d, v = u * i.b - l * i.a, d = u * i.d - l * i.c; if (this.ashearX = 0, this.ascaleX = Math.sqrt(c * c + v * v), this.ascaleX > 1e-4) { var _ = c * d - f * v; this.ascaleY = _ / this.ascaleX, this.ashearY = Math.atan2(c * f + v * d, _) * s.M8.radDeg, this.arotation = Math.atan2(v, c) * s.M8.radDeg } else this.ascaleX = 0, this.ascaleY = Math.sqrt(f * f + d * d), this.ashearY = 0, this.arotation = 90 - Math.atan2(d, f) * s.M8.radDeg }, t.prototype.worldToLocal = function(t) { var i = this.matrix, n = i.a, s = i.c, e = i.b, r = i.d, h = 1 / (n * r - s * e), o = t.x - i.tx, u = t.y - i.ty; return t.x = o * r * h - u * s * h, t.y = u * n * h - o * e * h, t }, t.prototype.localToWorld = function(t) { var i = this.matrix, n = t.x, s = t.y; return t.x = n * i.a + s * i.c + i.tx, t.y = n * i.b + s * i.d + i.ty, t }, t.prototype.worldToLocalRotation = function(t) { var i = s.M8.sinDeg(t), n = s.M8.cosDeg(t), e = this.matrix; return Math.atan2(e.a * i - e.b * n, e.d * n - e.c * i) * s.M8.radDeg }, t.prototype.localToWorldRotation = function(t) { var i = s.M8.sinDeg(t), n = s.M8.cosDeg(t), e = this.matrix; return Math.atan2(n * e.b + i * e.d, n * e.a + i * e.c) * s.M8.radDeg }, t.prototype.rotateWorld = function(t) { var i = this.matrix, n = i.a, e = i.c, r = i.b, h = i.d, o = s.M8.cosDeg(t), u = s.M8.sinDeg(t); i.a = o * n - u * r, i.c = o * e - u * h, i.b = u * n + o * r, i.d = u * e + o * h, this.appliedValid = !1 }, t }(), Y = function(t, i, n) { if (this.x = 0, this.y = 0, this.rotation = 0, this.scaleX = 1, this.scaleY = 1, this.shearX = 0, this.shearY = 0, this.transformMode = s.Qe.Normal, this.skinRequired = !1, this.color = new s.Il, t < 0) throw new Error("index must be >= 0."); if (null == i) throw new Error("name cannot be null."); this.index = t, this.name = i, this.parent = n }, z = function(t, i, n) { this.name = t, this.order = i, this.skinRequired = n }, K = function(t, i) { if (null == i) throw new Error("data cannot be null."); this.time = t, this.data = i }, q = function(t) { this.name = t }, Z = function() { function t(t, i) { if (this.bendDirection = 0, this.compress = !1, this.stretch = !1, this.mix = 1, this.softness = 0, this.active = !1, null == t) throw new Error("data cannot be null."); if (null == i) throw new Error("skeleton cannot be null."); this.data = t, this.mix = t.mix, this.softness = t.softness, this.bendDirection = t.bendDirection, this.compress = t.compress, this.stretch = t.stretch, this.bones = new Array; for (var n = 0; n < t.bones.length; n++) this.bones.push(i.findBone(t.bones[n].name)); this.target = i.findBone(t.target.name) } return t.prototype.isActive = function() { return this.active }, t.prototype.apply = function() { this.update() }, t.prototype.update = function() { var t = this.target, i = this.bones; switch (i.length) { case 1: this.apply1(i[0], t.worldX, t.worldY, this.compress, this.stretch, this.data.uniform, this.mix); break; case 2: this.apply2(i[0], i[1], t.worldX, t.worldY, this.bendDirection, this.stretch, this.softness, this.mix) } }, t.prototype.apply1 = function(t, i, n, e, r, h, o) { t.appliedValid || t.updateAppliedTransform(); var u = t.parent.matrix, a = u.a, l = u.c, c = u.b, f = u.d, v = -t.ashearX - t.arotation, d = 0, _ = 0; switch (t.data.transformMode) { case s.Qe.OnlyTranslation: d = i - t.worldX, _ = n - t.worldY; break; case s.Qe.NoRotationOrReflection: var p = Math.abs(a * f - l * c) / (a * a + c * c), m = a / t.skeleton.scaleX, b = c / t.skeleton.scaleY; l = -b * p * t.skeleton.scaleX, f = m * p * t.skeleton.scaleY, v += Math.atan2(b, m) * s.M8.radDeg; default: var w = i - u.tx, g = n - u.ty, y = a * f - l * c; d = (w * f - g * l) / y - t.ax, _ = (g * a - w * c) / y - t.ay } v += Math.atan2(_, d) * s.M8.radDeg, t.ascaleX < 0 && (v += 180), v > 180 ? v -= 360 : v < -180 && (v += 360); var E = t.ascaleX, S = t.ascaleY; if (e || r) { switch (t.data.transformMode) { case s.Qe.NoScale: case s.Qe.NoScaleOrReflection: d = i - t.worldX, _ = n - t.worldY } var A = t.data.length * E, T = Math.sqrt(d * d + _ * _); if (e && T < A || r && T > A && A > 1e-4) E *= p = (T / A - 1) * o + 1, h && (S *= p) } t.updateWorldTransformWith(t.ax, t.ay, t.arotation + v * o, E, S, t.ashearX, t.ashearY) }, t.prototype.apply2 = function(t, i, n, e, r, h, o, u) { if (0 != u) { t.appliedValid || t.updateAppliedTransform(), i.appliedValid || i.updateAppliedTransform(); var a = t.ax, l = t.ay, c = t.ascaleX, f = c, v = t.ascaleY, d = i.ascaleX, _ = t.matrix, p = 0, m = 0, b = 0; c < 0 ? (c = -c, p = 180, b = -1) : (p = 0, b = 1), v < 0 && (v = -v, b = -b), d < 0 ? (d = -d, m = 180) : m = 0; var w = i.ax, g = 0, y = 0, E = 0, S = _.a, A = _.c, T = _.b, M = _.d, O = Math.abs(c - v) <= 1e-4; O ? (y = S * w + A * (g = i.ay) + _.tx, E = T * w + M * g + _.ty) : (g = 0, y = S * w + _.tx, E = T * w + _.ty); var I, N, R = t.parent.matrix, P = 1 / ((S = R.a) * (M = R.d) - (A = R.c) * (T = R.b)), x = y - R.tx, L = E - R.ty, C = (x * M - L * A) * P - a, U = (L * S - x * T) * P - l, k = Math.sqrt(C * C + U * U), F = i.data.length * d; if (k < 1e-4) return this.apply1(t, n, e, !1, h, !1, u), void i.updateWorldTransformWith(w, g, 0, i.ascaleX, i.ascaleY, i.ashearX, i.ashearY); var B = ((x = n - R.tx) * M - (L = e - R.ty) * A) * P - a, D = (L * S - x * T) * P - l, j = B * B + D * D; if (0 != o) { o *= c * (d + 1) / 2; var G = Math.sqrt(j), W = G - k - F * c + o; if (W > 0) { var H = Math.min(1, W / (2 * o)) - 1; j = (B -= (H = (W - o * (1 - H * H)) / G) * B) * B + (D -= H * D) * D } } t: if (O) { var X = (j - k * k - (F *= c) * F) / (2 * k * F); X < -1 ? X = -1 : X > 1 && (X = 1, h && (f *= (Math.sqrt(j) / (k + F) - 1) * u + 1)), N = Math.acos(X) * r, S = k + F * X, A = F * Math.sin(N), I = Math.atan2(D * S - B * A, B * S + D * A) } else { var V = (S = c * F) * S, $ = (A = v * F) * A, Y = Math.atan2(D, B), z = -2 * $ * k, K = $ - V; if ((M = z * z - 4 * K * (T = $ * k * k + V * j - V * $)) >= 0) { var q = Math.sqrt(M); z < 0 && (q = -q); var Z = (q = -(z + q) / 2) / K, J = T / q, Q = Math.abs(Z) < Math.abs(J) ? Z : J; if (Q * Q <= j) { L = Math.sqrt(j - Q * Q) * r, I = Y - Math.atan2(L, Q), N = Math.atan2(L / v, (Q - k) / c); break t } } var tt = s.M8.PI, it = k - S, nt = it * it, st = 0, et = 0, rt = k + S, ht = rt * rt, ot = 0; (T = -S * k / (V - $)) >= -1 && T <= 1 && (T = Math.acos(T), (M = (x = S * Math.cos(T) + k) * x + (L = A * Math.sin(T)) * L) < nt && (tt = T, nt = M, it = x, st = L), M > ht && (et = T, ht = M, rt = x, ot = L)), j <= (nt + ht) / 2 ? (I = Y - Math.atan2(st * r, it), N = tt * r) : (I = Y - Math.atan2(ot * r, rt), N = et * r) } var ut = Math.atan2(g, w) * b, at = t.arotation; (I = (I - ut) * s.M8.radDeg + p - at) > 180 ? I -= 360 : I < -180 && (I += 360), t.updateWorldTransformWith(a, l, at + I * u, f, t.ascaleY, 0, 0), (N = ((N + ut) * s.M8.radDeg - i.ashearX) * b + m - (at = i.arotation)) > 180 ? N -= 360 : N < -180 && (N += 360), i.updateWorldTransformWith(w, g, at + N * u, i.ascaleX, i.ascaleY, i.ashearX, i.ashearY) } else i.updateWorldTransform() }, t }(), J = function(t) { function i(i) { var n = t.call(this, i, 0, !1) || this; return n.bones = new Array, n.bendDirection = 1, n.compress = !1, n.stretch = !1, n.uniform = !1, n.mix = 1, n.softness = 0, n } return o(i, t), i }(z), Q = function(t) { function i(i) { var n = t.call(this, i, 0, !1) || this; return n.bones = new Array, n } return o(i, t), i }(z); (H = W || (W = {}))[H.Length = 0] = "Length", H[H.Fixed = 1] = "Fixed", H[H.Percent = 2] = "Percent"; var tt = function() { function t(t, i) { if (this.position = 0, this.spacing = 0, this.rotateMix = 0, this.translateMix = 0, this.spaces = new Array, this.positions = new Array, this.world = new Array, this.curves = new Array, this.lengths = new Array, this.segments = new Array, this.active = !1, null == t) throw new Error("data cannot be null."); if (null == i) throw new Error("skeleton cannot be null."); this.data = t, this.bones = new Array; for (var n = 0, s = t.bones.length; n < s; n++) this.bones.push(i.findBone(t.bones[n].name)); this.target = i.findSlot(t.target.name), this.position = t.position, this.spacing = t.spacing, this.rotateMix = t.rotateMix, this.translateMix = t.translateMix } return t.prototype.isActive = function() { return this.active }, t.prototype.apply = function() { this.update() }, t.prototype.update = function() { var i = this.target.getAttachment(); if (i instanceof _) { var n = this.rotateMix, e = this.translateMix, r = n > 0; if (e > 0 || r) { var h = this.data, o = h.spacingMode, u = o == W.Length, a = h.rotateMode, l = a == s.YK.Tangent, c = a == s.YK.ChainScale, f = this.bones.length, v = l ? f : f + 1, d = this.bones, p = s.cQ.setArraySize(this.spaces, v), m = null, b = this.spacing; if (c || u) { c && (m = s.cQ.setArraySize(this.lengths, f)); for (var w = 0, g = v - 1; w < g;) { var y = (P = d[w]).data.length; if (y < t.epsilon) c && (m[w] = 0), p[++w] = 0; else { var E = y * P.matrix.a, S = y * P.matrix.b, A = Math.sqrt(E * E + S * S); c && (m[w] = A), p[++w] = (u ? y + b : b) * A / y } } } else for (w = 1; w < v; w++) p[w] = b; var T = this.computeWorldPositions(i, v, l, h.positionMode == s.T.Percent, o == W.Percent), M = T[0], O = T[1], I = h.offsetRotation, N = !1; if (0 == I) N = a == s.YK.Chain; else N = !1, I *= (R = this.target.bone.matrix).a * R.d - R.b * R.c > 0 ? s.M8.degRad : -s.M8.degRad; w = 0; for (var R = 3; w < f; w++, R += 3) { var P, x = (P = d[w]).matrix; x.tx += (M - x.tx) * e, x.ty += (O - x.ty) * e; var L = (E = T[R]) - M, C = (S = T[R + 1]) - O; if (c) { var U = m[w]; if (0 != U) { var k = (Math.sqrt(L * L + C * C) / U - 1) * n + 1; x.a *= k, x.b *= k } } if (M = E, O = S, r) { var F = x.a, B = x.c, D = x.b, j = x.d, G = 0, H = 0, X = 0; if (G = l ? T[R - 1] : 0 == p[w + 1] ? T[R + 2] : Math.atan2(C, L), G -= Math.atan2(D, F), N) { H = Math.cos(G), X = Math.sin(G); var V = P.data.length; M += (V * (H * F - X * D) - L) * n, O += (V * (X * F + H * D) - C) * n } else G += I; G > s.M8.PI ? G -= s.M8.PI2 : G < -s.M8.PI && (G += s.M8.PI2), G *= n, H = Math.cos(G), X = Math.sin(G), x.a = H * F - X * D, x.c = H * B - X * j, x.b = X * F + H * D, x.d = X * B + H * j } P.appliedValid = !1 } } } }, t.prototype.computeWorldPositions = function(i, n, e, r, h) { var o = this.target, u = this.position, a = this.spaces, l = s.cQ.setArraySize(this.positions, 3 * n + 2), c = null, f = i.closed, v = i.worldVerticesLength, d = v / 6, _ = t.NONE; if (!i.constantSpeed) { var p = i.lengths, m = p[d -= f ? 1 : 2]; if (r && (u *= m), h) for (var b = 0; b < n; b++) a[b] *= m; c = s.cQ.setArraySize(this.world, 8); b = 0; for (var w = 0, g = 0; b < n; b++, w += 3) { var y = u += V = a[b]; if (f)(y %= m) < 0 && (y += m), g = 0; else { if (y < 0) { _ != t.BEFORE && (_ = t.BEFORE, i.computeWorldVertices(o, 2, 4, c, 0, 2)), this.addBeforePosition(y, c, 0, l, w); continue } if (y > m) { _ != t.AFTER && (_ = t.AFTER, i.computeWorldVertices(o, v - 6, 4, c, 0, 2)), this.addAfterPosition(y - m, c, 0, l, w); continue } } for (;; g++) { var E = p[g]; if (!(y > E)) { if (0 == g) y /= E; else y = (y - (K = p[g - 1])) / (E - K); break } } g != _ && (_ = g, f && g == d ? (i.computeWorldVertices(o, v - 4, 4, c, 0, 2), i.computeWorldVertices(o, 0, 4, c, 4, 2)) : i.computeWorldVertices(o, 6 * g + 2, 8, c, 0, 2)), this.addCurvePosition(y, c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], l, w, e || b > 0 && 0 == V) } return l } f ? (c = s.cQ.setArraySize(this.world, v += 2), i.computeWorldVertices(o, 2, v - 4, c, 0, 2), i.computeWorldVertices(o, 0, 2, c, v - 4, 2), c[v - 2] = c[0], c[v - 1] = c[1]) : (d--, c = s.cQ.setArraySize(this.world, v -= 4), i.computeWorldVertices(o, 2, v, c, 0, 2)); for (var S = s.cQ.setArraySize(this.curves, d), A = 0, T = c[0], M = c[1], O = 0, I = 0, N = 0, R = 0, P = 0, x = 0, L = 0, C = 0, U = 0, k = 0, F = 0, B = 0, D = 0, j = 0, G = (b = 0, 2); b < d; b++, G += 6) F = 2 * (L = .1875 * (T - 2 * (O = c[G]) + (N = c[G + 2]))) + (U = .09375 * (3 * (O - N) - T + (P = c[G + 4]))), B = 2 * (C = .1875 * (M - 2 * (I = c[G + 1]) + (R = c[G + 3]))) + (k = .09375 * (3 * (I - R) - M + (x = c[G + 5]))), D = .75 * (O - T) + L + .16666667 * U, j = .75 * (I - M) + C + .16666667 * k, A += Math.sqrt(D * D + j * j), D += F, j += B, F += U, B += k, A += Math.sqrt(D * D + j * j), D += F, j += B, A += Math.sqrt(D * D + j * j), D += F + U, j += B + k, A += Math.sqrt(D * D + j * j), S[b] = A, T = P, M = x; if (r && (u *= A), h) for (b = 0; b < n; b++) a[b] *= A; for (var W = this.segments, H = 0, X = (b = 0, w = 0, g = 0, 0); b < n; b++, w += 3) { var V; y = u += V = a[b]; if (f)(y %= A) < 0 && (y += A), g = 0; else { if (y < 0) { this.addBeforePosition(y, c, 0, l, w); continue } if (y > A) { this.addAfterPosition(y - A, c, v - 4, l, w); continue } } for (;; g++) { var $ = S[g]; if (!(y > $)) { if (0 == g) y /= $; else y = (y - (K = S[g - 1])) / ($ - K); break } } if (g != _) { _ = g; var Y = 6 * g; for (F = 2 * (L = .03 * ((T = c[Y]) - 2 * (O = c[Y + 2]) + (N = c[Y + 4]))) + (U = .006 * (3 * (O - N) - T + (P = c[Y + 6]))), B = 2 * (C = .03 * ((M = c[Y + 1]) - 2 * (I = c[Y + 3]) + (R = c[Y + 5]))) + (k = .006 * (3 * (I - R) - M + (x = c[Y + 7]))), D = .3 * (O - T) + L + .16666667 * U, j = .3 * (I - M) + C + .16666667 * k, H = Math.sqrt(D * D + j * j), W[0] = H, Y = 1; Y < 8; Y++) D += F, j += B, F += U, B += k, H += Math.sqrt(D * D + j * j), W[Y] = H; D += F, j += B, H += Math.sqrt(D * D + j * j), W[8] = H, D += F + U, j += B + k, H += Math.sqrt(D * D + j * j), W[9] = H, X = 0 } for (y *= H;; X++) { var z = W[X]; if (!(y > z)) { var K; if (0 == X) y /= z; else y = X + (y - (K = W[X - 1])) / (z - K); break } } this.addCurvePosition(.1 * y, T, M, O, I, N, R, P, x, l, w, e || b > 0 && 0 == V) } return l }, t.prototype.addBeforePosition = function(t, i, n, s, e) { var r = i[n], h = i[n + 1], o = Math.atan2(i[n + 3] - h, i[n + 2] - r); s[e] = r + t * Math.cos(o), s[e + 1] = h + t * Math.sin(o), s[e + 2] = o }, t.prototype.addAfterPosition = function(t, i, n, s, e) { var r = i[n + 2], h = i[n + 3], o = Math.atan2(h - i[n + 1], r - i[n]); s[e] = r + t * Math.cos(o), s[e + 1] = h + t * Math.sin(o), s[e + 2] = o }, t.prototype.addCurvePosition = function(t, i, n, s, e, r, h, o, u, a, l, c) { (0 == t || isNaN(t)) && (t = 1e-4); var f = t * t, v = f * t, d = 1 - t, _ = d * d, p = _ * d, m = d * t, b = 3 * m, w = d * b, g = b * t, y = i * p + s * w + r * g + o * v, E = n * p + e * w + h * g + u * v; a[l] = y, a[l + 1] = E, c && (a[l + 2] = Math.atan2(E - (n * _ + e * m * 2 + h * f), y - (i * _ + s * m * 2 + r * f))) }, t.NONE = -1, t.BEFORE = -2, t.AFTER = -3, t.epsilon = 1e-5, t }(), it = function() { function t(t, i) { if (this.rotateMix = 0, this.translateMix = 0, this.scaleMix = 0, this.shearMix = 0, this.temp = new s.FM, this.active = !1, null == t) throw new Error("data cannot be null."); if (null == i) throw new Error("skeleton cannot be null."); this.data = t, this.rotateMix = t.rotateMix, this.translateMix = t.translateMix, this.scaleMix = t.scaleMix, this.shearMix = t.shearMix, this.bones = new Array; for (var n = 0; n < t.bones.length; n++) this.bones.push(i.findBone(t.bones[n].name)); this.target = i.findBone(t.target.name) } return t.prototype.isActive = function() { return this.active }, t.prototype.apply = function() { this.update() }, t.prototype.update = function() { this.data.local ? this.data.relative ? this.applyRelativeLocal() : this.applyAbsoluteLocal() : this.data.relative ? this.applyRelativeWorld() : this.applyAbsoluteWorld() }, t.prototype.applyAbsoluteWorld = function() { for (var t = this.rotateMix, i = this.translateMix, n = this.scaleMix, e = this.shearMix, r = this.target, h = r.matrix, o = h.a, u = h.c, a = h.b, l = h.d, c = o * l - u * a > 0 ? s.M8.degRad : -s.M8.degRad, f = this.data.offsetRotation * c, v = this.data.offsetShearY * c, d = this.bones, _ = 0, p = d.length; _ < p; _++) { var m = d[_], b = !1, w = m.matrix; if (0 != t) { var g = w.a, y = w.c, E = w.b, S = w.d; (N = Math.atan2(a, o) - Math.atan2(E, g) + f) > s.M8.PI ? N -= s.M8.PI2 : N < -s.M8.PI && (N += s.M8.PI2), N *= t; var A = Math.cos(N), T = Math.sin(N); w.a = A * g - T * E, w.c = A * y - T * S, w.b = T * g + A * E, w.d = T * y + A * S, b = !0 } if (0 != i) { var M = this.temp; r.localToWorld(M.set(this.data.offsetX, this.data.offsetY)), w.tx += (M.x - w.tx) * i, w.ty += (M.y - w.ty) * i, b = !0 } if (n > 0) { var O = Math.sqrt(w.a * w.a + w.b * w.b), I = Math.sqrt(o * o + a * a); O > 1e-5 && (O = (O + (I - O + this.data.offsetScaleX) * n) / O), w.a *= O, w.b *= O, O = Math.sqrt(w.c * w.c + w.d * w.d), I = Math.sqrt(u * u + l * l), O > 1e-5 && (O = (O + (I - O + this.data.offsetScaleY) * n) / O), w.c *= O, w.d *= O, b = !0 } if (e > 0) { y = w.c, S = w.d; var N, R = Math.atan2(S, y); (N = Math.atan2(l, u) - Math.atan2(a, o) - (R - Math.atan2(w.b, w.a))) > s.M8.PI ? N -= s.M8.PI2 : N < -s.M8.PI && (N += s.M8.PI2), N = R + (N + v) * e; O = Math.sqrt(y * y + S * S); w.c = Math.cos(N) * O, w.d = Math.sin(N) * O, b = !0 } b && (m.appliedValid = !1) } }, t.prototype.applyRelativeWorld = function() { for (var t = this.rotateMix, i = this.translateMix, n = this.scaleMix, e = this.shearMix, r = this.target, h = r.matrix, o = h.a, u = h.c, a = h.b, l = h.d, c = o * l - u * a > 0 ? s.M8.degRad : -s.M8.degRad, f = this.data.offsetRotation * c, v = this.data.offsetShearY * c, d = this.bones, _ = 0, p = d.length; _ < p; _++) { var m = d[_], b = !1, w = m.matrix; if (0 != t) { var g = w.a, y = w.c, E = w.b, S = w.d; (I = Math.atan2(a, o) + f) > s.M8.PI ? I -= s.M8.PI2 : I < -s.M8.PI && (I += s.M8.PI2), I *= t; var A = Math.cos(I), T = Math.sin(I); w.a = A * g - T * E, w.c = A * y - T * S, w.b = T * g + A * E, w.d = T * y + A * S, b = !0 } if (0 != i) { var M = this.temp; r.localToWorld(M.set(this.data.offsetX, this.data.offsetY)), w.tx += M.x * i, w.ty += M.y * i, b = !0 } if (n > 0) { var O = (Math.sqrt(o * o + a * a) - 1 + this.data.offsetScaleX) * n + 1; w.a *= O, w.b *= O, O = (Math.sqrt(u * u + l * l) - 1 + this.data.offsetScaleY) * n + 1, w.c *= O, w.d *= O, b = !0 } if (e > 0) { var I; (I = Math.atan2(l, u) - Math.atan2(a, o)) > s.M8.PI ? I -= s.M8.PI2 : I < -s.M8.PI && (I += s.M8.PI2); y = w.c, S = w.d; I = Math.atan2(S, y) + (I - s.M8.PI / 2 + v) * e; O = Math.sqrt(y * y + S * S); w.c = Math.cos(I) * O, w.d = Math.sin(I) * O, b = !0 } b && (m.appliedValid = !1) } }, t.prototype.applyAbsoluteLocal = function() { var t = this.rotateMix, i = this.translateMix, n = this.scaleMix, s = this.shearMix, e = this.target; e.appliedValid || e.updateAppliedTransform(); for (var r = this.bones, h = 0, o = r.length; h < o; h++) { var u = r[h]; u.appliedValid || u.updateAppliedTransform(); var a = u.arotation; if (0 != t) { var l = e.arotation - a + this.data.offsetRotation; a += (l -= 360 * (16384 - (16384.499999999996 - l / 360 | 0))) * t } var c = u.ax, f = u.ay; 0 != i && (c += (e.ax - c + this.data.offsetX) * i, f += (e.ay - f + this.data.offsetY) * i); var v = u.ascaleX, d = u.ascaleY; n > 0 && (v > 1e-5 && (v = (v + (e.ascaleX - v + this.data.offsetScaleX) * n) / v), d > 1e-5 && (d = (d + (e.ascaleY - d + this.data.offsetScaleY) * n) / d)); var _ = u.ashearY; if (s > 0) { l = e.ashearY - _ + this.data.offsetShearY; u.shearY += (l -= 360 * (16384 - (16384.499999999996 - l / 360 | 0))) * s } u.updateWorldTransformWith(c, f, a, v, d, u.ashearX, _) } }, t.prototype.applyRelativeLocal = function() { var t = this.rotateMix, i = this.translateMix, n = this.scaleMix, s = this.shearMix, e = this.target; e.appliedValid || e.updateAppliedTransform(); for (var r = this.bones, h = 0, o = r.length; h < o; h++) { var u = r[h]; u.appliedValid || u.updateAppliedTransform(); var a = u.arotation; 0 != t && (a += (e.arotation + this.data.offsetRotation) * t); var l = u.ax, c = u.ay; 0 != i && (l += (e.ax + this.data.offsetX) * i, c += (e.ay + this.data.offsetY) * i); var f = u.ascaleX, v = u.ascaleY; n > 0 && (f > 1e-5 && (f *= (e.ascaleX - 1 + this.data.offsetScaleX) * n + 1), v > 1e-5 && (v *= (e.ascaleY - 1 + this.data.offsetScaleY) * n + 1)); var d = u.ashearY; s > 0 && (d += (e.ashearY + this.data.offsetShearY) * s), u.updateWorldTransformWith(l, c, a, f, v, u.ashearX, d) } }, t }(), nt = function() { function t(t) { if (this.F = new Array, this.updateCacheReset = new Array, this.time = 0, this.scaleX = 1, this.scaleY = 1, this.x = 0, this.y = 0, null == t) throw new Error("data cannot be null."); this.data = t, this.bones = new Array; for (var i = 0; i < t.bones.length; i++) { var n = t.bones[i], e = void 0; if (null == n.parent) e = new $(n, this, null); else { var r = this.bones[n.parent.index]; e = new $(n, this, r), r.children.push(e) } this.bones.push(e) } this.slots = new Array, this.drawOrder = new Array; for (i = 0; i < t.slots.length; i++) { var h = t.slots[i], o = new m(h, e = this.bones[h.boneData.index]); this.slots.push(o), this.drawOrder.push(o) } this.ikConstraints = new Array; for (i = 0; i < t.ikConstraints.length; i++) { this.ikConstraints.push(new Z(t.ikConstraints[i], this)) } this.transformConstraints = new Array; for (i = 0; i < t.transformConstraints.length; i++) { this.transformConstraints.push(new it(t.transformConstraints[i], this)) } this.pathConstraints = new Array; for (i = 0; i < t.pathConstraints.length; i++) { this.pathConstraints.push(new tt(t.pathConstraints[i], this)) } this.color = new s.Il(1, 1, 1, 1), this.updateCache() } return t.prototype.updateCache = function() { this.F.length = 0, this.updateCacheReset.length = 0; for (var t = this.bones, i = 0, n = t.length; i < n; i++) { (e = t[i]).sorted = e.data.skinRequired, e.active = !e.sorted } if (null != this.skin) { var s = this.skin.bones; for (i = 0, n = this.skin.bones.length; i < n; i++) { var e = this.bones[s[i].index]; do { e.sorted = !1, e.active = !0, e = e.parent } while (null != e) } } var r = this.ikConstraints, h = this.transformConstraints, o = this.pathConstraints, u = r.length, a = h.length, l = o.length, c = u + a + l; t: for (i = 0; i < c; i++) { for (var f = 0; f < u; f++) { if ((v = r[f]).data.order == i) { this.sortIkConstraint(v); continue t } } for (f = 0; f < a; f++) { if ((v = h[f]).data.order == i) { this.sortTransformConstraint(v); continue t } } for (f = 0; f < l; f++) { var v; if ((v = o[f]).data.order == i) { this.sortPathConstraint(v); continue t } } } for (i = 0, n = t.length; i < n; i++) this.sortBone(t[i]) }, t.prototype.sortIkConstraint = function(t) { if (t.active = t.target.isActive() && (!t.data.skinRequired || null != this.skin && s.cQ.contains(this.skin.constraints, t.data, !0)), t.active) { this.sortBone(t.target); var i = t.bones, n = i[0]; if (this.sortBone(n), i.length > 1) { var e = i[i.length - 1]; this.F.indexOf(e) > -1 || this.updateCacheReset.push(e) } this.F.push(t), this.sortReset(n.children), i[i.length - 1].sorted = !0 } }, t.prototype.sortPathConstraint = function(t) { if (t.active = t.target.bone.isActive() && (!t.data.skinRequired || null != this.skin && s.cQ.contains(this.skin.constraints, t.data, !0)), t.active) { var i = t.target, n = i.data.index, e = i.bone; null != this.skin && this.sortPathConstraintAttachment(this.skin, n, e), null != this.data.defaultSkin && this.data.defaultSkin != this.skin && this.sortPathConstraintAttachment(this.data.defaultSkin, n, e); for (var r = 0, h = this.data.skins.length; r < h; r++) this.sortPathConstraintAttachment(this.data.skins[r], n, e); var o = i.getAttachment(); o instanceof _ && this.sortPathConstraintAttachmentWith(o, e); var u = t.bones, a = u.length; for (r = 0; r < a; r++) this.sortBone(u[r]); this.F.push(t); for (r = 0; r < a; r++) this.sortReset(u[r].children); for (r = 0; r < a; r++) u[r].sorted = !0 } }, t.prototype.sortTransformConstraint = function(t) { if (t.active = t.target.isActive() && (!t.data.skinRequired || null != this.skin && s.cQ.contains(this.skin.constraints, t.data, !0)), t.active) { this.sortBone(t.target); var i = t.bones, n = i.length; if (t.data.local) for (var e = 0; e < n; e++) { var r = i[e]; this.sortBone(r.parent), this.F.indexOf(r) > -1 || this.updateCacheReset.push(r) } else for (e = 0; e < n; e++) this.sortBone(i[e]); this.F.push(t); for (var h = 0; h < n; h++) this.sortReset(i[h].children); for (h = 0; h < n; h++) i[h].sorted = !0 } }, t.prototype.sortPathConstraintAttachment = function(t, i, n) { var s = t.attachments[i]; if (s) for (var e in s) this.sortPathConstraintAttachmentWith(s[e], n) }, t.prototype.sortPathConstraintAttachmentWith = function(t, i) { if (t instanceof _) { var n = t.bones; if (null == n) this.sortBone(i); else for (var s = this.bones, e = 0; e < n.length;) for (var r = n[e++], h = e + r; e < h; e++) { this.sortBone(s[n[e]]) } } }, t.prototype.sortBone = function(t) { if (!t.sorted) { var i = t.parent; null != i && this.sortBone(i), t.sorted = !0, this.F.push(t) } }, t.prototype.sortReset = function(t) { for (var i = 0, n = t.length; i < n; i++) { var s = t[i]; s.active && (s.sorted && this.sortReset(s.children), s.sorted = !1) } }, t.prototype.updateWorldTransform = function() { for (var t = this.updateCacheReset, i = 0, n = t.length; i < n; i++) { var s = t[i]; s.ax = s.x, s.ay = s.y, s.arotation = s.rotation, s.ascaleX = s.scaleX, s.ascaleY = s.scaleY, s.ashearX = s.shearX, s.ashearY = s.shearY, s.appliedValid = !0 } var e = this.F; for (i = 0, n = e.length; i < n; i++) e[i].update() }, t.prototype.setToSetupPose = function() { this.setBonesToSetupPose(), this.setSlotsToSetupPose() }, t.prototype.setBonesToSetupPose = function() { for (var t = this.bones, i = 0, n = t.length; i < n; i++) t[i].setToSetupPose(); var s = this.ikConstraints; for (i = 0, n = s.length; i < n; i++) { (h = s[i]).mix = h.data.mix, h.softness = h.data.softness, h.bendDirection = h.data.bendDirection, h.compress = h.data.compress, h.stretch = h.data.stretch } var e = this.transformConstraints; for (i = 0, n = e.length; i < n; i++) { (h = e[i]).rotateMix = (o = h.data).rotateMix, h.translateMix = o.translateMix, h.scaleMix = o.scaleMix, h.shearMix = o.shearMix } var r = this.pathConstraints; for (i = 0, n = r.length; i < n; i++) { var h, o; (h = r[i]).position = (o = h.data).position, h.spacing = o.spacing, h.rotateMix = o.rotateMix, h.translateMix = o.translateMix } }, t.prototype.setSlotsToSetupPose = function() { var t = this.slots; s.cQ.arrayCopy(t, 0, this.drawOrder, 0, t.length); for (var i = 0, n = t.length; i < n; i++) t[i].setToSetupPose() }, t.prototype.getRootBone = function() { return 0 == this.bones.length ? null : this.bones[0] }, t.prototype.findBone = function(t) { if (null == t) throw new Error("boneName cannot be null."); for (var i = this.bones, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.data.name == t) return e } return null }, t.prototype.findBoneIndex = function(t) { if (null == t) throw new Error("boneName cannot be null."); for (var i = this.bones, n = 0, s = i.length; n < s; n++) if (i[n].data.name == t) return n; return -1 }, t.prototype.findSlot = function(t) { if (null == t) throw new Error("slotName cannot be null."); for (var i = this.slots, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.data.name == t) return e } return null }, t.prototype.findSlotIndex = function(t) { if (null == t) throw new Error("slotName cannot be null."); for (var i = this.slots, n = 0, s = i.length; n < s; n++) if (i[n].data.name == t) return n; return -1 }, t.prototype.setSkinByName = function(t) { var i = this.data.findSkin(t); if (null == i) throw new Error("Skin not found: " + t); this.setSkin(i) }, t.prototype.setSkin = function(t) { if (t != this.skin) { if (null != t) if (null != this.skin) t.attachAll(this, this.skin); else for (var i = this.slots, n = 0, s = i.length; n < s; n++) { var e = i[n], r = e.data.attachmentName; if (null != r) { var h = t.getAttachment(n, r); null != h && e.setAttachment(h) } } this.skin = t, this.updateCache() } }, t.prototype.getAttachmentByName = function(t, i) { return this.getAttachment(this.data.findSlotIndex(t), i) }, t.prototype.getAttachment = function(t, i) { if (null == i) throw new Error("attachmentName cannot be null."); if (null != this.skin) { var n = this.skin.getAttachment(t, i); if (null != n) return n } return null != this.data.defaultSkin ? this.data.defaultSkin.getAttachment(t, i) : null }, t.prototype.setAttachment = function(t, i) { if (null == t) throw new Error("slotName cannot be null."); for (var n = this.slots, s = 0, e = n.length; s < e; s++) { var r = n[s]; if (r.data.name == t) { var h = null; if (null != i && null == (h = this.getAttachment(s, i))) throw new Error("Attachment not found: " + i + ", for slot: " + t); return void r.setAttachment(h) } } throw new Error("Slot not found: " + t) }, t.prototype.findIkConstraint = function(t) { if (null == t) throw new Error("constraintName cannot be null."); for (var i = this.ikConstraints, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.data.name == t) return e } return null }, t.prototype.findTransformConstraint = function(t) { if (null == t) throw new Error("constraintName cannot be null."); for (var i = this.transformConstraints, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.data.name == t) return e } return null }, t.prototype.findPathConstraint = function(t) { if (null == t) throw new Error("constraintName cannot be null."); for (var i = this.pathConstraints, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.data.name == t) return e } return null }, t.prototype.getBounds = function(t, i, n) { if (void 0 === n && (n = new Array(2)), null == t) throw new Error("offset cannot be null."); if (null == i) throw new Error("size cannot be null."); for (var e = this.drawOrder, r = Number.POSITIVE_INFINITY, h = Number.POSITIVE_INFINITY, o = Number.NEGATIVE_INFINITY, u = Number.NEGATIVE_INFINITY, a = 0, l = e.length; a < l; a++) { var c = e[a]; if (c.bone.active) { var f = 0, v = null, _ = c.getAttachment(); if (_ instanceof b) v = s.cQ.setArraySize(n, f = 8, 0), _.computeWorldVertices(c.bone, v, 0, 2); else if (_ instanceof d) { var p = _; v = s.cQ.setArraySize(n, f = p.worldVerticesLength, 0), p.computeWorldVertices(c, 0, f, v, 0, 2) } if (null != v) for (var m = 0, w = v.length; m < w; m += 2) { var g = v[m], y = v[m + 1]; r = Math.min(r, g), h = Math.min(h, y), o = Math.max(o, g), u = Math.max(u, y) } } } t.set(r, h), i.set(o - r, u - h) }, t.prototype.update = function(t) { this.time += t }, Object.defineProperty(t.prototype, "flipX", { get: function() { return -1 == this.scaleX }, set: function(i) { t.deprecatedWarning1 || (t.deprecatedWarning1 = !0), this.scaleX = i ? 1 : -1 }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "flipY", { get: function() { return -1 == this.scaleY }, set: function(i) { t.deprecatedWarning1 || (t.deprecatedWarning1 = !0), this.scaleY = i ? 1 : -1 }, enumerable: !1, configurable: !0 }), t.deprecatedWarning1 = !1, t }(), st = function() { function t() { this.bones = new Array, this.slots = new Array, this.skins = new Array, this.events = new Array, this.animations = new Array, this.ikConstraints = new Array, this.transformConstraints = new Array, this.pathConstraints = new Array, this.fps = 0 } return t.prototype.findBone = function(t) { if (null == t) throw new Error("boneName cannot be null."); for (var i = this.bones, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.name == t) return e } return null }, t.prototype.findBoneIndex = function(t) { if (null == t) throw new Error("boneName cannot be null."); for (var i = this.bones, n = 0, s = i.length; n < s; n++) if (i[n].name == t) return n; return -1 }, t.prototype.findSlot = function(t) { if (null == t) throw new Error("slotName cannot be null."); for (var i = this.slots, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.name == t) return e } return null }, t.prototype.findSlotIndex = function(t) { if (null == t) throw new Error("slotName cannot be null."); for (var i = this.slots, n = 0, s = i.length; n < s; n++) if (i[n].name == t) return n; return -1 }, t.prototype.findSkin = function(t) { if (null == t) throw new Error("skinName cannot be null."); for (var i = this.skins, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.name == t) return e } return null }, t.prototype.findEvent = function(t) { if (null == t) throw new Error("eventDataName cannot be null."); for (var i = this.events, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.name == t) return e } return null }, t.prototype.findAnimation = function(t) { if (null == t) throw new Error("animationName cannot be null."); for (var i = this.animations, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.name == t) return e } return null }, t.prototype.findIkConstraint = function(t) { if (null == t) throw new Error("constraintName cannot be null."); for (var i = this.ikConstraints, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.name == t) return e } return null }, t.prototype.findTransformConstraint = function(t) { if (null == t) throw new Error("constraintName cannot be null."); for (var i = this.transformConstraints, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.name == t) return e } return null }, t.prototype.findPathConstraint = function(t) { if (null == t) throw new Error("constraintName cannot be null."); for (var i = this.pathConstraints, n = 0, s = i.length; n < s; n++) { var e = i[n]; if (e.name == t) return e } return null }, t.prototype.findPathConstraintIndex = function(t) { if (null == t) throw new Error("pathConstraintName cannot be null."); for (var i = this.pathConstraints, n = 0, s = i.length; n < s; n++) if (i[n].name == t) return n; return -1 }, t }(), et = function(t, i, n) { if (this.color = new s.Il(1, 1, 1, 1), t < 0) throw new Error("index must be >= 0."); if (null == i) throw new Error("name cannot be null."); if (null == n) throw new Error("boneData cannot be null."); this.index = t, this.name = i, this.boneData = n }, rt = function(t) { function i(i) { var n = t.call(this, i, 0, !1) || this; return n.bones = new Array, n.rotateMix = 0, n.translateMix = 0, n.scaleMix = 0, n.shearMix = 0, n.offsetRotation = 0, n.offsetX = 0, n.offsetY = 0, n.offsetScaleX = 0, n.offsetScaleY = 0, n.offsetShearY = 0, n.relative = !1, n.local = !1, n } return o(i, t), i }(z), ht = function(t, i, n) { this.slotIndex = t, this.name = i, this.attachment = n }, ot = function() { function t(t) { if (this.attachments = new Array, this.bones = Array(), this.constraints = new Array, null == t) throw new Error("name cannot be null."); this.name = t } return t.prototype.setAttachment = function(t, i, n) { if (null == n) throw new Error("attachment cannot be null."); var s = this.attachments; t >= s.length && (s.length = t + 1), s[t] || (s[t] = {}), s[t][i] = n }, t.prototype.addSkin = function(t) { for (var i = 0; i < t.bones.length; i++) { for (var n = t.bones[i], s = !1, e = 0; e < this.bones.length; e++) if (this.bones[e] == n) { s = !0; break } s || this.bones.push(n) } for (i = 0; i < t.constraints.length; i++) { var r = t.constraints[i]; for (s = !1, e = 0; e < this.constraints.length; e++) if (this.constraints[e] == r) { s = !0; break } s || this.constraints.push(r) } var h = t.getAttachments(); for (i = 0; i < h.length; i++) { var o = h[i]; this.setAttachment(o.slotIndex, o.name, o.attachment) } }, t.prototype.copySkin = function(t) { for (var i = 0; i < t.bones.length; i++) { for (var n = t.bones[i], s = !1, e = 0; e < this.bones.length; e++) if (this.bones[e] == n) { s = !0; break } s || this.bones.push(n) } for (i = 0; i < t.constraints.length; i++) { var r = t.constraints[i]; for (s = !1, e = 0; e < this.constraints.length; e++) if (this.constraints[e] == r) { s = !0; break } s || this.constraints.push(r) } var h = t.getAttachments(); for (i = 0; i < h.length; i++) { var o = h[i]; null != o.attachment && (o.attachment instanceof d ? (o.attachment = o.attachment.newLinkedMesh(), this.setAttachment(o.slotIndex, o.name, o.attachment)) : (o.attachment = o.attachment.copy(), this.setAttachment(o.slotIndex, o.name, o.attachment))) } }, t.prototype.getAttachment = function(t, i) { var n = this.attachments[t]; return n ? n[i] : null }, t.prototype.removeAttachment = function(t, i) { var n = this.attachments[t]; n && (n[i] = null) }, t.prototype.getAttachments = function() { for (var t = new Array, i = 0; i < this.attachments.length; i++) { var n = this.attachments[i]; if (n) for (var s in n) { var e = n[s]; e && t.push(new ht(i, s, e)) } } return t }, t.prototype.getAttachmentsForSlot = function(t, i) { var n = this.attachments[t]; if (n) for (var s in n) { var e = n[s]; e && i.push(new ht(t, s, e)) } }, t.prototype.clear = function() { this.attachments.length = 0, this.bones.length = 0, this.constraints.length = 0 }, t.prototype.attachAll = function(t, i) { for (var n = 0, s = 0; s < t.slots.length; s++) { var e = t.slots[s], r = e.getAttachment(); if (r && n < i.attachments.length) { var h = i.attachments[n]; for (var o in h) { if (r == h[o]) { var u = this.getAttachment(n, o); null != u && e.setAttachment(u); break } } } n++ } }, t }(), ut = function() { function t(t) { this.scale = 1, this.linkedMeshes = new Array, this.attachmentLoader = t } return t.prototype.readSkeletonData = function(i) { var n = this.scale, e = new st; e.name = ""; var r = new s.YT(i); if (e.hash = r.readString(), e.version = r.readString(), "3.8.75" === e.version); e.x = r.readFloat(), e.y = r.readFloat(), e.width = r.readFloat(), e.height = r.readFloat(); var h = r.readBoolean(); h && (e.fps = r.readFloat(), e.imagesPath = r.readString(), e.audioPath = r.readString()); var o = 0; o = r.readInt(!0); for (var u = 0; u < o; u++) r.strings.push(r.readString()); o = r.readInt(!0); for (u = 0; u < o; u++) { var a = r.readString(), l = 0 == u ? null : e.bones[r.readInt(!0)]; (v = new Y(u, a, l)).rotation = r.readFloat(), v.x = r.readFloat() * n, v.y = r.readFloat() * n, v.scaleX = r.readFloat(), v.scaleY = r.readFloat(), v.shearX = r.readFloat(), v.shearY = r.readFloat(), v.length = r.readFloat() * n, v.transformMode = t.TransformModeValues[r.readInt(!0)], v.skinRequired = r.readBoolean(), h && s.Il.rgba8888ToColor(v.color, r.readInt32()), e.bones.push(v) } o = r.readInt(!0); for (u = 0; u < o; u++) { var c = r.readString(), f = e.bones[r.readInt(!0)], v = new et(u, c, f); s.Il.rgba8888ToColor(v.color, r.readInt32()); var d = r.readInt32(); - 1 != d && s.Il.rgb888ToColor(v.darkColor = new s.Il, d), v.attachmentName = r.readStringRef(), v.blendMode = t.BlendModeValues[r.readInt(!0)], e.slots.push(v) } o = r.readInt(!0); u = 0; for (var _ = void 0; u < o; u++) { (v = new J(r.readString())).order = r.readInt(!0), v.skinRequired = r.readBoolean(), _ = r.readInt(!0); for (var p = 0; p < _; p++) v.bones.push(e.bones[r.readInt(!0)]); v.target = e.bones[r.readInt(!0)], v.mix = r.readFloat(), v.softness = r.readFloat() * n, v.bendDirection = r.readByte(), v.compress = r.readBoolean(), v.stretch = r.readBoolean(), v.uniform = r.readBoolean(), e.ikConstraints.push(v) } o = r.readInt(!0); for (u = 0, _ = void 0; u < o; u++) { (v = new rt(r.readString())).order = r.readInt(!0), v.skinRequired = r.readBoolean(), _ = r.readInt(!0); for (p = 0; p < _; p++) v.bones.push(e.bones[r.readInt(!0)]); v.target = e.bones[r.readInt(!0)], v.local = r.readBoolean(), v.relative = r.readBoolean(), v.offsetRotation = r.readFloat(), v.offsetX = r.readFloat() * n, v.offsetY = r.readFloat() * n, v.offsetScaleX = r.readFloat(), v.offsetScaleY = r.readFloat(), v.offsetShearY = r.readFloat(), v.rotateMix = r.readFloat(), v.translateMix = r.readFloat(), v.scaleMix = r.readFloat(), v.shearMix = r.readFloat(), e.transformConstraints.push(v) } o = r.readInt(!0); for (u = 0, _ = void 0; u < o; u++) { (v = new Q(r.readString())).order = r.readInt(!0), v.skinRequired = r.readBoolean(), _ = r.readInt(!0); for (p = 0; p < _; p++) v.bones.push(e.bones[r.readInt(!0)]); v.target = e.slots[r.readInt(!0)], v.positionMode = t.PositionModeValues[r.readInt(!0)], v.spacingMode = t.SpacingModeValues[r.readInt(!0)], v.rotateMode = t.RotateModeValues[r.readInt(!0)], v.offsetRotation = r.readFloat(), v.position = r.readFloat(), v.positionMode == s.T.Fixed && (v.position *= n), v.spacing = r.readFloat(), v.spacingMode != W.Length && v.spacingMode != W.Fixed || (v.spacing *= n), v.rotateMix = r.readFloat(), v.translateMix = r.readFloat(), e.pathConstraints.push(v) } var m = this.readSkin(r, e, !0, h); for (null != m && (e.defaultSkin = m, e.skins.push(m)), s.cQ.setArraySize(e.skins, o = (u = e.skins.length) + r.readInt(!0)); u < o; u++) e.skins[u] = this.readSkin(r, e, !1, h); o = this.linkedMeshes.length; for (u = 0; u < o; u++) { var b = this.linkedMeshes[u], w = null == b.skin ? e.defaultSkin : e.findSkin(b.skin); if (null == w) throw new Error("Skin not found: " + b.skin); var g = w.getAttachment(b.slotIndex, b.parent); if (null == g) throw new Error("Parent mesh not found: " + b.parent); b.mesh.deformAttachment = b.inheritDeform ? g : b.mesh, b.mesh.setParentMesh(g) } this.linkedMeshes.length = 0, o = r.readInt(!0); for (u = 0; u < o; u++) { (v = new q(r.readStringRef())).intValue = r.readInt(!1), v.floatValue = r.readFloat(), v.stringValue = r.readString(), v.audioPath = r.readString(), null != v.audioPath && (v.volume = r.readFloat(), v.balance = r.readFloat()), e.events.push(v) } o = r.readInt(!0); for (u = 0; u < o; u++) e.animations.push(this.readAnimation(r, r.readString(), e)); return e }, t.prototype.readSkin = function(t, i, n, s) { var e = null, r = 0; if (n) { if (0 == (r = t.readInt(!0))) return null; e = new ot("default") } else { (e = new ot(t.readStringRef())).bones.length = t.readInt(!0); for (var h = 0, o = e.bones.length; h < o; h++) e.bones[h] = i.bones[t.readInt(!0)]; for (h = 0, o = t.readInt(!0); h < o; h++) e.constraints.push(i.ikConstraints[t.readInt(!0)]); for (h = 0, o = t.readInt(!0); h < o; h++) e.constraints.push(i.transformConstraints[t.readInt(!0)]); for (h = 0, o = t.readInt(!0); h < o; h++) e.constraints.push(i.pathConstraints[t.readInt(!0)]); r = t.readInt(!0) } for (h = 0; h < r; h++) for (var u = t.readInt(!0), a = 0, l = t.readInt(!0); a < l; a++) { var c = t.readStringRef(), f = this.readAttachment(t, i, e, u, c, s); null != f && e.setAttachment(u, c, f) } return e }, t.prototype.readAttachment = function(i, n, e, r, h, o) { var u = this.scale, a = i.readStringRef(); null == a && (a = h); var l = i.readByte(); switch (t.AttachmentTypeValues[l]) { case s.sf.Region: var c = i.readStringRef(), f = i.readFloat(), v = i.readFloat(), d = i.readFloat(), _ = i.readFloat(), p = i.readFloat(), m = i.readFloat(), b = i.readFloat(), w = i.readInt32(); null == c && (c = a); var g = this.attachmentLoader.newRegionAttachment(e, a, c); return null == g ? null : (g.path = c, g.x = v * u, g.y = d * u, g.scaleX = _, g.scaleY = p, g.rotation = f, g.width = m * u, g.height = b * u, s.Il.rgba8888ToColor(g.color, w), g); case s.sf.BoundingBox: var y = i.readInt(!0), E = this.readVertices(i, y), S = (w = o ? i.readInt32() : 0, this.attachmentLoader.newBoundingBoxAttachment(e, a)); return null == S ? null : (S.worldVerticesLength = y << 1, S.vertices = E.vertices, S.bones = E.bones, o && s.Il.rgba8888ToColor(S.color, w), S); case s.sf.Mesh: c = i.readStringRef(), w = i.readInt32(), y = i.readInt(!0); var A = this.readFloatArray(i, y << 1, 1), T = this.readShortArray(i), M = (E = this.readVertices(i, y), i.readInt(!0)), O = null; m = 0, b = 0; return o && (O = this.readShortArray(i), m = i.readFloat(), b = i.readFloat()), null == c && (c = a), null == (I = this.attachmentLoader.newMeshAttachment(e, a, c)) ? null : (I.path = c, s.Il.rgba8888ToColor(I.color, w), I.bones = E.bones, I.vertices = E.vertices, I.worldVerticesLength = y << 1, I.triangles = T, I.regionUVs = new Float32Array(A), I.hullLength = M << 1, o && (I.edges = O, I.width = m * u, I.height = b * u), I); case s.sf.LinkedMesh: c = i.readStringRef(), w = i.readInt32(); var I, N = i.readStringRef(), R = i.readStringRef(), P = i.readBoolean(); m = 0, b = 0; return o && (m = i.readFloat(), b = i.readFloat()), null == c && (c = a), null == (I = this.attachmentLoader.newMeshAttachment(e, a, c)) ? null : (I.path = c, s.Il.rgba8888ToColor(I.color, w), o && (I.width = m * u, I.height = b * u), this.linkedMeshes.push(new at(I, N, r, R, P)), I); case s.sf.Path: for (var x = i.readBoolean(), L = i.readBoolean(), C = (y = i.readInt(!0), E = this.readVertices(i, y), s.cQ.newArray(y / 3, 0)), U = 0, k = C.length; U < k; U++) C[U] = i.readFloat() * u; w = o ? i.readInt32() : 0; return null == (c = this.attachmentLoader.newPathAttachment(e, a)) ? null : (c.closed = x, c.constantSpeed = L, c.worldVerticesLength = y << 1, c.vertices = E.vertices, c.bones = E.bones, c.lengths = C, o && s.Il.rgba8888ToColor(c.color, w), c); case s.sf.Point: f = i.readFloat(), v = i.readFloat(), d = i.readFloat(), w = o ? i.readInt32() : 0; var F = this.attachmentLoader.newPointAttachment(e, a); return null == F ? null : (F.x = v * u, F.y = d * u, F.rotation = f, o && s.Il.rgba8888ToColor(F.color, w), F); case s.sf.Clipping: var B = i.readInt(!0), D = (y = i.readInt(!0), E = this.readVertices(i, y), w = o ? i.readInt32() : 0, this.attachmentLoader.newClippingAttachment(e, a)); return null == D ? null : (D.endSlot = n.slots[B], D.worldVerticesLength = y << 1, D.vertices = E.vertices, D.bones = E.bones, o && s.Il.rgba8888ToColor(D.color, w), D) } return null }, t.prototype.readVertices = function(t, i) { var n = i << 1, e = new lt, r = this.scale; if (!t.readBoolean()) return e.vertices = this.readFloatArray(t, n, r), e; for (var h = new Array, o = new Array, u = 0; u < i; u++) { var a = t.readInt(!0); o.push(a); for (var l = 0; l < a; l++) o.push(t.readInt(!0)), h.push(t.readFloat() * r), h.push(t.readFloat() * r), h.push(t.readFloat()) } return e.vertices = s.cQ.toFloatArray(h), e.bones = o, e }, t.prototype.readFloatArray = function(t, i, n) { var s = new Array(i); if (1 == n) for (var e = 0; e < i; e++) s[e] = t.readFloat(); else for (e = 0; e < i; e++) s[e] = t.readFloat() * n; return s }, t.prototype.readShortArray = function(t) { for (var i = t.readInt(!0), n = new Array(i), s = 0; s < i; s++) n[s] = t.readShort(); return n }, t.prototype.readAnimation = function(i, n, e) { for (var r = new Array, h = this.scale, o = 0, u = new s.Il, a = new s.Il, l = 0, c = i.readInt(!0); l < c; l++) for (var f = i.readInt(!0), v = 0, d = i.readInt(!0); v < d; v++) { var _ = i.readByte(), p = i.readInt(!0); switch (_) { case t.SLOT_ATTACHMENT: (y = new N(p)).slotIndex = f; for (var m = 0; m < p; m++) y.setFrame(m, i.readFloat(), i.readStringRef()); r.push(y), o = Math.max(o, y.frames[p - 1]); break; case t.SLOT_COLOR: (y = new O(p)).slotIndex = f; for (m = 0; m < p; m++) { var b = i.readFloat(); s.Il.rgba8888ToColor(u, i.readInt32()), y.setFrame(m, b, u.r, u.g, u.b, u.a), m < p - 1 && this.readCurve(i, m, y) } r.push(y), o = Math.max(o, y.frames[(p - 1) * O.ENTRIES]); break; case t.SLOT_TWO_COLOR: (y = new I(p)).slotIndex = f; for (m = 0; m < p; m++) { b = i.readFloat(); s.Il.rgba8888ToColor(u, i.readInt32()), s.Il.rgb888ToColor(a, i.readInt32()), y.setFrame(m, b, u.r, u.g, u.b, u.a, a.r, a.g, a.b), m < p - 1 && this.readCurve(i, m, y) } r.push(y), o = Math.max(o, y.frames[(p - 1) * I.ENTRIES]) } } for (l = 0, c = i.readInt(!0); l < c; l++) { var g = i.readInt(!0); for (v = 0, d = i.readInt(!0); v < d; v++) { _ = i.readByte(), p = i.readInt(!0); switch (_) { case t.BONE_ROTATE: (y = new S(p)).boneIndex = g; for (m = 0; m < p; m++) y.setFrame(m, i.readFloat(), i.readFloat()), m < p - 1 && this.readCurve(i, m, y); r.push(y), o = Math.max(o, y.frames[(p - 1) * S.ENTRIES]); break; case t.BONE_TRANSLATE: case t.BONE_SCALE: case t.BONE_SHEAR: var y = void 0, E = 1; _ == t.BONE_SCALE ? y = new T(p) : _ == t.BONE_SHEAR ? y = new M(p) : (y = new A(p), E = h), y.boneIndex = g; for (m = 0; m < p; m++) y.setFrame(m, i.readFloat(), i.readFloat() * E, i.readFloat() * E), m < p - 1 && this.readCurve(i, m, y); r.push(y), o = Math.max(o, y.frames[(p - 1) * A.ENTRIES]) } } } for (l = 0, c = i.readInt(!0); l < c; l++) { var R = i.readInt(!0); p = i.readInt(!0); (y = new C(p)).ikConstraintIndex = R; for (m = 0; m < p; m++) y.setFrame(m, i.readFloat(), i.readFloat(), i.readFloat() * h, i.readByte(), i.readBoolean(), i.readBoolean()), m < p - 1 && this.readCurve(i, m, y); r.push(y), o = Math.max(o, y.frames[(p - 1) * C.ENTRIES]) } for (l = 0, c = i.readInt(!0); l < c; l++) { R = i.readInt(!0), p = i.readInt(!0); (y = new U(p)).transformConstraintIndex = R; for (m = 0; m < p; m++) y.setFrame(m, i.readFloat(), i.readFloat(), i.readFloat(), i.readFloat(), i.readFloat()), m < p - 1 && this.readCurve(i, m, y); r.push(y), o = Math.max(o, y.frames[(p - 1) * U.ENTRIES]) } for (l = 0, c = i.readInt(!0); l < c; l++) { R = i.readInt(!0); var D = e.pathConstraints[R]; for (v = 0, d = i.readInt(!0); v < d; v++) { _ = i.readByte(), p = i.readInt(!0); switch (_) { case t.PATH_POSITION: case t.PATH_SPACING: y = void 0, E = 1; _ == t.PATH_SPACING ? (y = new F(p), D.spacingMode != W.Length && D.spacingMode != W.Fixed || (E = h)) : (y = new k(p), D.positionMode == s.T.Fixed && (E = h)), y.pathConstraintIndex = R; for (m = 0; m < p; m++) y.setFrame(m, i.readFloat(), i.readFloat() * E), m < p - 1 && this.readCurve(i, m, y); r.push(y), o = Math.max(o, y.frames[(p - 1) * k.ENTRIES]); break; case t.PATH_MIX: (y = new B(p)).pathConstraintIndex = R; for (m = 0; m < p; m++) y.setFrame(m, i.readFloat(), i.readFloat(), i.readFloat()), m < p - 1 && this.readCurve(i, m, y); r.push(y), o = Math.max(o, y.frames[(p - 1) * B.ENTRIES]) } } } for (l = 0, c = i.readInt(!0); l < c; l++) { var j = e.skins[i.readInt(!0)]; for (v = 0, d = i.readInt(!0); v < d; v++) { f = i.readInt(!0); for (var G = 0, H = i.readInt(!0); G < H; G++) { var X = j.getAttachment(f, i.readStringRef()), V = null != X.bones, $ = X.vertices, Y = V ? $.length / 3 * 2 : $.length; p = i.readInt(!0); (y = new P(p)).slotIndex = f, y.attachment = X; for (m = 0; m < p; m++) { b = i.readFloat(); var z = void 0, q = i.readInt(!0); if (0 == q) z = V ? s.cQ.newFloatArray(Y) : $; else { z = s.cQ.newFloatArray(Y); var Z = i.readInt(!0); if (q += Z, 1 == h) for (var J = Z; J < q; J++) z[J] = i.readFloat(); else for (J = Z; J < q; J++) z[J] = i.readFloat() * h; if (!V) { J = 0; for (var Q = z.length; J < Q; J++) z[J] += $[J] } } y.setFrame(m, b, z), m < p - 1 && this.readCurve(i, m, y) } r.push(y), o = Math.max(o, y.frames[p - 1]) } } } var tt = i.readInt(!0); if (tt > 0) { y = new L(tt); var it = e.slots.length; for (l = 0; l < tt; l++) { b = i.readFloat(); var nt = i.readInt(!0), st = s.cQ.newArray(it, 0); for (v = it - 1; v >= 0; v--) st[v] = -1; var et = s.cQ.newArray(it - nt, 0), rt = 0, ht = 0; for (v = 0; v < nt; v++) { for (f = i.readInt(!0); rt != f;) et[ht++] = rt++; st[rt + i.readInt(!0)] = rt++ } for (; rt < it;) et[ht++] = rt++; for (v = it - 1; v >= 0; v--) - 1 == st[v] && (st[v] = et[--ht]); y.setFrame(l, b, st) } r.push(y), o = Math.max(o, y.frames[tt - 1]) } var ot = i.readInt(!0); if (ot > 0) { for (y = new x(ot), l = 0; l < ot; l++) { b = i.readFloat(); var ut = e.events[i.readInt(!0)], at = new K(b, ut); at.intValue = i.readInt(!1), at.floatValue = i.readFloat(), at.stringValue = i.readBoolean() ? i.readString() : ut.stringValue, null != at.data.audioPath && (at.volume = i.readFloat(), at.balance = i.readFloat()), y.setFrame(l, at) } r.push(y), o = Math.max(o, y.frames[ot - 1]) } return new w(n, r, o) }, t.prototype.readCurve = function(i, n, s) { switch (i.readByte()) { case t.CURVE_STEPPED: s.setStepped(n); break; case t.CURVE_BEZIER: this.setCurve(s, n, i.readFloat(), i.readFloat(), i.readFloat(), i.readFloat()) } }, t.prototype.setCurve = function(t, i, n, s, e, r) { t.setCurve(i, n, s, e, r) }, t.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6], t.TransformModeValues = [s.Qe.Normal, s.Qe.OnlyTranslation, s.Qe.NoRotationOrReflection, s.Qe.NoScale, s.Qe.NoScaleOrReflection], t.PositionModeValues = [s.T.Fixed, s.T.Percent], t.SpacingModeValues = [W.Length, W.Fixed, W.Percent], t.RotateModeValues = [s.YK.Tangent, s.YK.Chain, s.YK.ChainScale], t.BlendModeValues = [r.T$.NORMAL, r.T$.ADD, r.T$.MULTIPLY, r.T$.SCREEN], t.BONE_ROTATE = 0, t.BONE_TRANSLATE = 1, t.BONE_SCALE = 2, t.BONE_SHEAR = 3, t.SLOT_ATTACHMENT = 0, t.SLOT_COLOR = 1, t.SLOT_TWO_COLOR = 2, t.PATH_POSITION = 0, t.PATH_SPACING = 1, t.PATH_MIX = 2, t.CURVE_LINEAR = 0, t.CURVE_STEPPED = 1, t.CURVE_BEZIER = 2, t }(), at = function(t, i, n, s, e) { this.mesh = t, this.skin = i, this.slotIndex = n, this.parent = s, this.inheritDeform = e }, lt = function(t, i) { void 0 === t && (t = null), void 0 === i && (i = null), this.bones = t, this.vertices = i }, ct = (function(t) { function i() { return null !== t && t.apply(this, arguments) || this } o(i, t) }(s.o$), function() { function t(t) { this.scale = 1, this.linkedMeshes = new Array, this.attachmentLoader = t } return t.prototype.readSkeletonData = function(i) { var n = this.scale, e = new st, r = "string" == typeof i ? JSON.parse(i) : i, h = r.skeleton; if (null != h) { if (e.hash = h.hash, e.version = h.spine, "3.8" !== e.version.substr(0, 3)); if ("3.8.75" === e.version); e.x = h.x, e.y = h.y, e.width = h.width, e.height = h.height, e.fps = h.fps, e.imagesPath = h.images } if (r.bones) for (var o = 0; o < r.bones.length; o++) { var u = r.bones[o], a = null, l = this.getValue(u, "parent", null); if (null != l && null == (a = e.findBone(l))) throw new Error("Parent bone not found: " + l); (v = new Y(e.bones.length, u.name, a)).length = this.getValue(u, "length", 0) * n, v.x = this.getValue(u, "x", 0) * n, v.y = this.getValue(u, "y", 0) * n, v.rotation = this.getValue(u, "rotation", 0), v.scaleX = this.getValue(u, "scaleX", 1), v.scaleY = this.getValue(u, "scaleY", 1), v.shearX = this.getValue(u, "shearX", 0), v.shearY = this.getValue(u, "shearY", 0), v.transformMode = t.transformModeFromString(this.getValue(u, "transform", "normal")), v.skinRequired = this.getValue(u, "skin", !1), e.bones.push(v) } if (r.slots) for (o = 0; o < r.slots.length; o++) { var c = (M = r.slots[o]).name, f = e.findBone(w = M.bone); if (null == f) throw new Error("Slot bone not found: " + w); var v = new et(e.slots.length, c, f), d = this.getValue(M, "color", null); null != d && v.color.setFromString(d); var _ = this.getValue(M, "dark", null); null != _ && (v.darkColor = new s.Il(1, 1, 1, 1), v.darkColor.setFromString(_)), v.attachmentName = this.getValue(M, "attachment", null), v.blendMode = t.blendModeFromString(this.getValue(M, "blend", "normal")), e.slots.push(v) } if (r.ik) for (o = 0; o < r.ik.length; o++) { (v = new J((m = r.ik[o]).name)).order = this.getValue(m, "order", 0), v.skinRequired = this.getValue(m, "skin", !1); for (var p = 0; p < m.bones.length; p++) { if (null == (S = e.findBone(w = m.bones[p]))) throw new Error("IK bone not found: " + w); v.bones.push(S) } if (v.target = e.findBone(b = m.target), null == v.target) throw new Error("IK target bone not found: " + b); v.mix = this.getValue(m, "mix", 1), v.softness = this.getValue(m, "softness", 0) * n, v.bendDirection = this.getValue(m, "bendPositive", !0) ? 1 : -1, v.compress = this.getValue(m, "compress", !1), v.stretch = this.getValue(m, "stretch", !1), v.uniform = this.getValue(m, "uniform", !1), e.ikConstraints.push(v) } if (r.transform) for (o = 0; o < r.transform.length; o++) { (v = new rt((m = r.transform[o]).name)).order = this.getValue(m, "order", 0), v.skinRequired = this.getValue(m, "skin", !1); for (p = 0; p < m.bones.length; p++) { if (null == (S = e.findBone(w = m.bones[p]))) throw new Error("Transform constraint bone not found: " + w); v.bones.push(S) } if (v.target = e.findBone(b = m.target), null == v.target) throw new Error("Transform constraint target bone not found: " + b); v.local = this.getValue(m, "local", !1), v.relative = this.getValue(m, "relative", !1), v.offsetRotation = this.getValue(m, "rotation", 0), v.offsetX = this.getValue(m, "x", 0) * n, v.offsetY = this.getValue(m, "y", 0) * n, v.offsetScaleX = this.getValue(m, "scaleX", 0), v.offsetScaleY = this.getValue(m, "scaleY", 0), v.offsetShearY = this.getValue(m, "shearY", 0), v.rotateMix = this.getValue(m, "rotateMix", 1), v.translateMix = this.getValue(m, "translateMix", 1), v.scaleMix = this.getValue(m, "scaleMix", 1), v.shearMix = this.getValue(m, "shearMix", 1), e.transformConstraints.push(v) } if (r.path) for (o = 0; o < r.path.length; o++) { var m, b; (v = new Q((m = r.path[o]).name)).order = this.getValue(m, "order", 0), v.skinRequired = this.getValue(m, "skin", !1); for (p = 0; p < m.bones.length; p++) { var w; if (null == (S = e.findBone(w = m.bones[p]))) throw new Error("Transform constraint bone not found: " + w); v.bones.push(S) } if (v.target = e.findSlot(b = m.target), null == v.target) throw new Error("Path target slot not found: " + b); v.positionMode = t.positionModeFromString(this.getValue(m, "positionMode", "percent")), v.spacingMode = t.spacingModeFromString(this.getValue(m, "spacingMode", "length")), v.rotateMode = t.rotateModeFromString(this.getValue(m, "rotateMode", "tangent")), v.offsetRotation = this.getValue(m, "rotation", 0), v.position = this.getValue(m, "position", 0), v.positionMode == s.T.Fixed && (v.position *= n), v.spacing = this.getValue(m, "spacing", 0), v.spacingMode != W.Length && v.spacingMode != W.Fixed || (v.spacing *= n), v.rotateMix = this.getValue(m, "rotateMix", 1), v.translateMix = this.getValue(m, "translateMix", 1), e.pathConstraints.push(v) } if (r.skins) for (o = 0; o < r.skins.length; o++) { var g = r.skins[o], y = new ot(g.name); if (g.bones) for (var E = 0; E < g.bones.length; E++) { var S; if (null == (S = e.findBone(g.bones[E]))) throw new Error("Skin bone not found: " + g.bones[o]); y.bones.push(S) } if (g.ik) for (E = 0; E < g.ik.length; E++) { if (null == (A = e.findIkConstraint(g.ik[E]))) throw new Error("Skin IK constraint not found: " + g.ik[o]); y.constraints.push(A) } if (g.transform) for (E = 0; E < g.transform.length; E++) { if (null == (A = e.findTransformConstraint(g.transform[E]))) throw new Error("Skin transform constraint not found: " + g.transform[o]); y.constraints.push(A) } if (g.path) for (E = 0; E < g.path.length; E++) { var A; if (null == (A = e.findPathConstraint(g.path[E]))) throw new Error("Skin path constraint not found: " + g.path[o]); y.constraints.push(A) } for (var c in g.attachments) { var T = e.findSlot(c); if (null == T) throw new Error("Slot not found: " + c); var M = g.attachments[c]; for (var O in M) { var I = this.readAttachment(M[O], y, T.index, O, e); null != I && y.setAttachment(T.index, O, I) } } e.skins.push(y), "default" == y.name && (e.defaultSkin = y) } o = 0; for (var N = this.linkedMeshes.length; o < N; o++) { var R = this.linkedMeshes[o]; if (null == (y = null == R.skin ? e.defaultSkin : e.findSkin(R.skin))) throw new Error("Skin not found: " + R.skin); var P = y.getAttachment(R.slotIndex, R.parent); if (null == P) throw new Error("Parent mesh not found: " + R.parent); R.mesh.deformAttachment = R.inheritDeform ? P : R.mesh, R.mesh.setParentMesh(P) } if (this.linkedMeshes.length = 0, r.events) for (var x in r.events) { var L = r.events[x]; (v = new q(x)).intValue = this.getValue(L, "int", 0), v.floatValue = this.getValue(L, "float", 0), v.stringValue = this.getValue(L, "string", ""), v.audioPath = this.getValue(L, "audio", null), null != v.audioPath && (v.volume = this.getValue(L, "volume", 1), v.balance = this.getValue(L, "balance", 0)), e.events.push(v) } if (r.animations) for (var C in r.animations) { this.readAnimation(r.animations[C], C, e) } return e }, t.prototype.readAttachment = function(t, i, n, e, r) { var h = this.scale; switch (e = this.getValue(t, "name", e), this.getValue(t, "type", "region")) { case "region": var o = this.getValue(t, "path", e), u = this.attachmentLoader.newRegionAttachment(i, e, o); return null == u ? null : (u.path = o, u.x = this.getValue(t, "x", 0) * h, u.y = this.getValue(t, "y", 0) * h, u.scaleX = this.getValue(t, "scaleX", 1), u.scaleY = this.getValue(t, "scaleY", 1), u.rotation = this.getValue(t, "rotation", 0), u.width = t.width * h, u.height = t.height * h, null != (b = this.getValue(t, "color", null)) && u.color.setFromString(b), u); case "boundingbox": var a = this.attachmentLoader.newBoundingBoxAttachment(i, e); return null == a ? null : (this.readVertices(t, a, t.vertexCount << 1), null != (b = this.getValue(t, "color", null)) && a.color.setFromString(b), a); case "mesh": case "linkedmesh": o = this.getValue(t, "path", e); var l = this.attachmentLoader.newMeshAttachment(i, e, o); if (null == l) return null; l.path = o, null != (b = this.getValue(t, "color", null)) && l.color.setFromString(b), l.width = this.getValue(t, "width", 0) * h, l.height = this.getValue(t, "height", 0) * h; var c = this.getValue(t, "parent", null); if (null != c) return this.linkedMeshes.push(new ft(l, this.getValue(t, "skin", null), n, c, this.getValue(t, "deform", !0))), l; var f = t.uvs; return this.readVertices(t, l, f.length), l.triangles = t.triangles, l.regionUVs = new Float32Array(f), l.edges = this.getValue(t, "edges", null), l.hullLength = 2 * this.getValue(t, "hull", 0), l; case "path": if (null == (o = this.attachmentLoader.newPathAttachment(i, e))) return null; o.closed = this.getValue(t, "closed", !1), o.constantSpeed = this.getValue(t, "constantSpeed", !0), this.readVertices(t, o, (m = t.vertexCount) << 1); for (var v = s.cQ.newArray(m / 3, 0), d = 0; d < t.lengths.length; d++) v[d] = t.lengths[d] * h; return o.lengths = v, null != (b = this.getValue(t, "color", null)) && o.color.setFromString(b), o; case "point": var _ = this.attachmentLoader.newPointAttachment(i, e); return null == _ ? null : (_.x = this.getValue(t, "x", 0) * h, _.y = this.getValue(t, "y", 0) * h, _.rotation = this.getValue(t, "rotation", 0), null != (b = this.getValue(t, "color", null)) && _.color.setFromString(b), _); case "clipping": var p = this.attachmentLoader.newClippingAttachment(i, e); if (null == p) return null; var m, b, w = this.getValue(t, "end", null); if (null != w) { var g = r.findSlot(w); if (null == g) throw new Error("Clipping end slot not found: " + w); p.endSlot = g } return this.readVertices(t, p, (m = t.vertexCount) << 1), null != (b = this.getValue(t, "color", null)) && p.color.setFromString(b), p } return null }, t.prototype.readVertices = function(t, i, n) { var e = this.scale; i.worldVerticesLength = n; var r = t.vertices; if (n != r.length) { var h = new Array, o = new Array; for (c = 0, f = r.length; c < f;) { var u = r[c++]; o.push(u); for (var a = c + 4 * u; c < a; c += 4) o.push(r[c]), h.push(r[c + 1] * e), h.push(r[c + 2] * e), h.push(r[c + 3]) } i.bones = o, i.vertices = s.cQ.toFloatArray(h) } else { var l = s.cQ.toFloatArray(r); if (1 != e) for (var c = 0, f = r.length; c < f; c++) l[c] *= e; i.vertices = l } }, t.prototype.readAnimation = function(t, i, n) { var e = this.scale, r = new Array, h = 0; if (t.slots) for (var o in t.slots) { var u = t.slots[o]; if (-1 == (dt = n.findSlotIndex(o))) throw new Error("Slot not found: " + o); for (var a in u) { var l = u[a]; if ("attachment" == a) { (y = new N(l.length)).slotIndex = dt; for (var c = 0, f = 0; f < l.length; f++) { y.setFrame(c++, this.getValue(v = l[f], "time", 0), v.name) } r.push(y), h = Math.max(h, y.frames[y.getFrameCount() - 1]) } else if ("color" == a) { (y = new O(l.length)).slotIndex = dt; for (c = 0, f = 0; f < l.length; f++) { var v = l[f], d = new s.Il; d.setFromString(v.color || "ffffffff"), y.setFrame(c, this.getValue(v, "time", 0), d.r, d.g, d.b, d.a), this.readCurve(v, y, c), c++ } r.push(y), h = Math.max(h, y.frames[(y.getFrameCount() - 1) * O.ENTRIES]) } else { if ("twoColor" != a) throw new Error("Invalid timeline type for a slot: " + a + " (" + o + ")"); (y = new I(l.length)).slotIndex = dt; for (c = 0, f = 0; f < l.length; f++) { v = l[f]; var _ = new s.Il, p = new s.Il; _.setFromString(v.light), p.setFromString(v.dark), y.setFrame(c, this.getValue(v, "time", 0), _.r, _.g, _.b, _.a, p.r, p.g, p.b), this.readCurve(v, y, c), c++ } r.push(y), h = Math.max(h, y.frames[(y.getFrameCount() - 1) * I.ENTRIES]) } } } if (t.bones) for (var m in t.bones) { var b = t.bones[m], g = n.findBoneIndex(m); if (-1 == g) throw new Error("Bone not found: " + m); for (var a in b) { l = b[a]; if ("rotate" === a) { (y = new S(l.length)).boneIndex = g; for (c = 0, f = 0; f < l.length; f++) { y.setFrame(c, this.getValue(v = l[f], "time", 0), this.getValue(v, "angle", 0)), this.readCurve(v, y, c), c++ } r.push(y), h = Math.max(h, y.frames[(y.getFrameCount() - 1) * S.ENTRIES]) } else { if ("translate" !== a && "scale" !== a && "shear" !== a) throw new Error("Invalid timeline type for a bone: " + a + " (" + m + ")"); var y = null, E = 1, R = 0; "scale" === a ? (y = new T(l.length), R = 1) : "shear" === a ? y = new M(l.length) : (y = new A(l.length), E = e), y.boneIndex = g; for (c = 0, f = 0; f < l.length; f++) { var D = this.getValue(v = l[f], "x", R), j = this.getValue(v, "y", R); y.setFrame(c, this.getValue(v, "time", 0), D * E, j * E), this.readCurve(v, y, c), c++ } r.push(y), h = Math.max(h, y.frames[(y.getFrameCount() - 1) * A.ENTRIES]) } } } if (t.ik) for (var G in t.ik) { var H = t.ik[G], X = n.findIkConstraint(G); (y = new C(H.length)).ikConstraintIndex = n.ikConstraints.indexOf(X); for (c = 0, f = 0; f < H.length; f++) { y.setFrame(c, this.getValue(v = H[f], "time", 0), this.getValue(v, "mix", 1), this.getValue(v, "softness", 0) * e, this.getValue(v, "bendPositive", !0) ? 1 : -1, this.getValue(v, "compress", !1), this.getValue(v, "stretch", !1)), this.readCurve(v, y, c), c++ } r.push(y), h = Math.max(h, y.frames[(y.getFrameCount() - 1) * C.ENTRIES]) } if (t.transform) for (var G in t.transform) { H = t.transform[G], X = n.findTransformConstraint(G); (y = new U(H.length)).transformConstraintIndex = n.transformConstraints.indexOf(X); for (c = 0, f = 0; f < H.length; f++) { y.setFrame(c, this.getValue(v = H[f], "time", 0), this.getValue(v, "rotateMix", 1), this.getValue(v, "translateMix", 1), this.getValue(v, "scaleMix", 1), this.getValue(v, "shearMix", 1)), this.readCurve(v, y, c), c++ } r.push(y), h = Math.max(h, y.frames[(y.getFrameCount() - 1) * U.ENTRIES]) } if (t.path) for (var G in t.path) { H = t.path[G]; var V = n.findPathConstraintIndex(G); if (-1 == V) throw new Error("Path constraint not found: " + G); var $ = n.pathConstraints[V]; for (var a in H) { l = H[a]; if ("position" === a || "spacing" === a) { y = null, E = 1; "spacing" === a ? (y = new F(l.length), $.spacingMode != W.Length && $.spacingMode != W.Fixed || (E = e)) : (y = new k(l.length), $.positionMode == s.T.Fixed && (E = e)), y.pathConstraintIndex = V; for (c = 0, f = 0; f < l.length; f++) { y.setFrame(c, this.getValue(v = l[f], "time", 0), this.getValue(v, a, 0) * E), this.readCurve(v, y, c), c++ } r.push(y), h = Math.max(h, y.frames[(y.getFrameCount() - 1) * k.ENTRIES]) } else if ("mix" === a) { (y = new B(l.length)).pathConstraintIndex = V; for (c = 0, f = 0; f < l.length; f++) { y.setFrame(c, this.getValue(v = l[f], "time", 0), this.getValue(v, "rotateMix", 1), this.getValue(v, "translateMix", 1)), this.readCurve(v, y, c), c++ } r.push(y), h = Math.max(h, y.frames[(y.getFrameCount() - 1) * B.ENTRIES]) } } } if (t.deform) for (var Y in t.deform) { var z = t.deform[Y], q = n.findSkin(Y); if (null != q) for (var o in z) { u = z[o]; if (-1 == (dt = n.findSlotIndex(o))) throw new Error("Slot not found: " + u.name); for (var a in u) { l = u[a]; var Z = q.getAttachment(dt, a); if (null == Z) throw new Error("Deform attachment not found: " + l.name); var J = null != Z.bones, Q = Z.vertices, tt = J ? Q.length / 3 * 2 : Q.length; (y = new P(l.length)).slotIndex = dt, y.attachment = Z; c = 0; for (var it = 0; it < l.length; it++) { var nt = void 0, st = this.getValue(v = l[it], "vertices", null); if (null == st) nt = J ? s.cQ.newFloatArray(tt) : Q; else { nt = s.cQ.newFloatArray(tt); var et = this.getValue(v, "offset", 0); if (s.cQ.arrayCopy(st, 0, nt, et, st.length), 1 != e) for (var rt = (f = et) + st.length; f < rt; f++) nt[f] *= e; if (!J) for (f = 0; f < tt; f++) nt[f] += Q[f] } y.setFrame(c, this.getValue(v, "time", 0), nt), this.readCurve(v, y, c), c++ } r.push(y), h = Math.max(h, y.frames[y.getFrameCount() - 1]) } } else if (s.Xd.FAIL_ON_NON_EXISTING_SKIN) throw new Error("Skin not found: " + Y) } var ht = t.drawOrder; if (null == ht && (ht = t.draworder), null != ht) { y = new L(ht.length); var ot = n.slots.length; for (c = 0, it = 0; it < ht.length; it++) { var ut = ht[it], at = null, lt = this.getValue(ut, "offsets", null); if (null != lt) { at = s.cQ.newArray(ot, -1); var ct = s.cQ.newArray(ot - lt.length, 0), ft = 0, vt = 0; for (f = 0; f < lt.length; f++) { var dt, _t = lt[f]; if (-1 == (dt = n.findSlotIndex(_t.slot))) throw new Error("Slot not found: " + _t.slot); for (; ft != dt;) ct[vt++] = ft++; at[ft + _t.offset] = ft++ } for (; ft < ot;) ct[vt++] = ft++; for (f = ot - 1; f >= 0; f--) - 1 == at[f] && (at[f] = ct[--vt]) } y.setFrame(c++, this.getValue(ut, "time", 0), at) } r.push(y), h = Math.max(h, y.frames[y.getFrameCount() - 1]) } if (t.events) { for (y = new x(t.events.length), c = 0, f = 0; f < t.events.length; f++) { var pt = t.events[f], mt = n.findEvent(pt.name); if (null == mt) throw new Error("Event not found: " + pt.name); var bt = new K(s.cQ.toSinglePrecision(this.getValue(pt, "time", 0)), mt); bt.intValue = this.getValue(pt, "int", mt.intValue), bt.floatValue = this.getValue(pt, "float", mt.floatValue), bt.stringValue = this.getValue(pt, "string", mt.stringValue), null != bt.data.audioPath && (bt.volume = this.getValue(pt, "volume", 1), bt.balance = this.getValue(pt, "balance", 0)), y.setFrame(c++, bt) } r.push(y), h = Math.max(h, y.frames[y.getFrameCount() - 1]) } if (isNaN(h)) throw new Error("Error while parsing animation, duration is NaN"); n.animations.push(new w(i, r, h)) }, t.prototype.readCurve = function(t, i, n) { t.hasOwnProperty("curve") && ("stepped" === t.curve ? i.setStepped(n) : i.setCurve(n, t.curve, this.getValue(t, "c2", 0), this.getValue(t, "c3", 1), this.getValue(t, "c4", 1))) }, t.prototype.getValue = function(t, i, n) { return void 0 !== t[i] ? t[i] : n }, t.blendModeFromString = function(t) { if ("normal" == (t = t.toLowerCase())) return r.T$.NORMAL; if ("additive" == t) return r.T$.ADD; if ("multiply" == t) return r.T$.MULTIPLY; if ("screen" == t) return r.T$.SCREEN; throw new Error("Unknown blend mode: " + t) }, t.positionModeFromString = function(t) { if ("fixed" == (t = t.toLowerCase())) return s.T.Fixed; if ("percent" == t) return s.T.Percent; throw new Error("Unknown position mode: " + t) }, t.spacingModeFromString = function(t) { if ("length" == (t = t.toLowerCase())) return W.Length; if ("fixed" == t) return W.Fixed; if ("percent" == t) return W.Percent; throw new Error("Unknown position mode: " + t) }, t.rotateModeFromString = function(t) { if ("tangent" == (t = t.toLowerCase())) return s.YK.Tangent; if ("chain" == t) return s.YK.Chain; if ("chainscale" == t) return s.YK.ChainScale; throw new Error("Unknown rotate mode: " + t) }, t.transformModeFromString = function(t) { if ("normal" == (t = t.toLowerCase())) return s.Qe.Normal; if ("onlytranslation" == t) return s.Qe.OnlyTranslation; if ("norotationorreflection" == t) return s.Qe.NoRotationOrReflection; if ("noscale" == t) return s.Qe.NoScale; if ("noscaleorreflection" == t) return s.Qe.NoScaleOrReflection; throw new Error("Unknown transform mode: " + t) }, t }()), ft = function(t, i, n, s, e) { this.mesh = t, this.skin = i, this.slotIndex = n, this.parent = s, this.inheritDeform = e }, vt = function(t) { function i() { return null !== t && t.apply(this, arguments) || this } return o(i, t), i.prototype.createSkeleton = function(t) { this.skeleton = new nt(t), this.skeleton.updateWorldTransform(), this.stateData = new X(t), this.state = new D(this.stateData) }, i }(s.Ww) }, 5700: (t, i, n) => { "use strict"; n.d(i, { M: () => r }); var s = n(6480), e = n(4577), r = function() { function t(i) { var n = this; this.stage = new s.W2, i = Object.assign({ forceCanvas: !1 }, i), this.renderer = (0, e.e6)(i), t.D.forEach((function(t) { t.init.call(n, i) })) } return t.registerPlugin = function(i) { t.D.push(i) }, t.prototype.render = function() { this.renderer.render(this.stage) }, Object.defineProperty(t.prototype, "view", { get: function() { return this.renderer.view }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "screen", { get: function() { return this.renderer.screen }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function(i, n) { var s = this, e = t.D.slice(0); e.reverse(), e.forEach((function(t) { t.destroy.call(s) })), this.stage.destroy(n), this.stage = null, this.renderer.destroy(i), this.renderer = null }, t.D = [], t }(), h = function() { function t() {} return t.init = function(t) { var i = this; Object.defineProperty(this, "resizeTo", { set: function(t) { globalThis.removeEventListener("resize", this.queueResize), this.H = t, t && (globalThis.addEventListener("resize", this.queueResize), this.resize()) }, get: function() { return this.H } }), this.queueResize = function() { i.H && (i.cancelResize(), i.V = requestAnimationFrame((function() { return i.resize() }))) }, this.cancelResize = function() { i.V && (cancelAnimationFrame(i.V), i.V = null) }, this.resize = function() { if (i.H) { var t, n; if (i.cancelResize(), i.H === globalThis.window) t = globalThis.innerWidth, n = globalThis.innerHeight; else { var s = i.H; t = s.clientWidth, n = s.clientHeight } i.renderer.resize(t, n) } }, this.V = null, this.H = null, this.resizeTo = t.resizeTo || null }, t.destroy = function() { globalThis.removeEventListener("resize", this.queueResize), this.cancelResize(), this.cancelResize = null, this.queueResize = null, this.resizeTo = null, this.resize = null }, t }(); r.registerPlugin(h) }, 4936: (t, i, n) => { "use strict"; /*! * @pixi/constants - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/constants is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ var s, e, r, h, o, u, a, l, c, f, v, d, _, p, m, b, w, g, y, E, S, A, T, M, O, I, N, R, P, x, L, C, U, k, F, B, D, j; n.d(i, { A7: () => U, G5: () => F, I2: () => v, N3: () => r, Nt: () => S, T$: () => a, UN: () => P, V0: () => o, Vi: () => s, WB: () => T, aH: () => y, cB: () => L, iw: () => O, lg: () => c, mr: () => D, oT: () => w, sp: () => _, vK: () => m, yl: () => N }), (e = s || (s = {}))[e.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", e[e.WEBGL = 1] = "WEBGL", e[e.WEBGL2 = 2] = "WEBGL2", (h = r || (r = {}))[h.UNKNOWN = 0] = "UNKNOWN", h[h.WEBGL = 1] = "WEBGL", h[h.CANVAS = 2] = "CANVAS", (u = o || (o = {}))[u.COLOR = 16384] = "COLOR", u[u.DEPTH = 256] = "DEPTH", u[u.STENCIL = 1024] = "STENCIL", (l = a || (a = {}))[l.NORMAL = 0] = "NORMAL", l[l.ADD = 1] = "ADD", l[l.MULTIPLY = 2] = "MULTIPLY", l[l.SCREEN = 3] = "SCREEN", l[l.OVERLAY = 4] = "OVERLAY", l[l.DARKEN = 5] = "DARKEN", l[l.LIGHTEN = 6] = "LIGHTEN", l[l.COLOR_DODGE = 7] = "COLOR_DODGE", l[l.COLOR_BURN = 8] = "COLOR_BURN", l[l.HARD_LIGHT = 9] = "HARD_LIGHT", l[l.SOFT_LIGHT = 10] = "SOFT_LIGHT", l[l.DIFFERENCE = 11] = "DIFFERENCE", l[l.EXCLUSION = 12] = "EXCLUSION", l[l.HUE = 13] = "HUE", l[l.SATURATION = 14] = "SATURATION", l[l.COLOR = 15] = "COLOR", l[l.LUMINOSITY = 16] = "LUMINOSITY", l[l.NORMAL_NPM = 17] = "NORMAL_NPM", l[l.ADD_NPM = 18] = "ADD_NPM", l[l.SCREEN_NPM = 19] = "SCREEN_NPM", l[l.NONE = 20] = "NONE", l[l.SRC_OVER = 0] = "SRC_OVER", l[l.SRC_IN = 21] = "SRC_IN", l[l.SRC_OUT = 22] = "SRC_OUT", l[l.SRC_ATOP = 23] = "SRC_ATOP", l[l.DST_OVER = 24] = "DST_OVER", l[l.DST_IN = 25] = "DST_IN", l[l.DST_OUT = 26] = "DST_OUT", l[l.DST_ATOP = 27] = "DST_ATOP", l[l.ERASE = 26] = "ERASE", l[l.SUBTRACT = 28] = "SUBTRACT", l[l.XOR = 29] = "XOR", (f = c || (c = {}))[f.POINTS = 0] = "POINTS", f[f.LINES = 1] = "LINES", f[f.LINE_LOOP = 2] = "LINE_LOOP", f[f.LINE_STRIP = 3] = "LINE_STRIP", f[f.TRIANGLES = 4] = "TRIANGLES", f[f.TRIANGLE_STRIP = 5] = "TRIANGLE_STRIP", f[f.TRIANGLE_FAN = 6] = "TRIANGLE_FAN", (d = v || (v = {}))[d.RGBA = 6408] = "RGBA", d[d.RGB = 6407] = "RGB", d[d.RG = 33319] = "RG", d[d.RED = 6403] = "RED", d[d.RGBA_INTEGER = 36249] = "RGBA_INTEGER", d[d.RGB_INTEGER = 36248] = "RGB_INTEGER", d[d.RG_INTEGER = 33320] = "RG_INTEGER", d[d.RED_INTEGER = 36244] = "RED_INTEGER", d[d.ALPHA = 6406] = "ALPHA", d[d.LUMINANCE = 6409] = "LUMINANCE", d[d.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", d[d.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", d[d.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", (p = _ || (_ = {}))[p.TEXTURE_2D = 3553] = "TEXTURE_2D", p[p.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", p[p.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", p[p.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", p[p.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", p[p.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", p[p.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", p[p.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", p[p.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", (b = m || (m = {}))[b.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", b[b.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", b[b.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", b[b.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", b[b.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", b[b.UNSIGNED_INT = 5125] = "UNSIGNED_INT", b[b.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", b[b.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", b[b.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", b[b.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", b[b.BYTE = 5120] = "BYTE", b[b.SHORT = 5122] = "SHORT", b[b.INT = 5124] = "INT", b[b.FLOAT = 5126] = "FLOAT", b[b.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", b[b.HALF_FLOAT = 36193] = "HALF_FLOAT", (g = w || (w = {}))[g.FLOAT = 0] = "FLOAT", g[g.INT = 1] = "INT", g[g.UINT = 2] = "UINT", (E = y || (y = {}))[E.NEAREST = 0] = "NEAREST", E[E.LINEAR = 1] = "LINEAR", (A = S || (S = {}))[A.CLAMP = 33071] = "CLAMP", A[A.REPEAT = 10497] = "REPEAT", A[A.MIRRORED_REPEAT = 33648] = "MIRRORED_REPEAT", (M = T || (T = {}))[M.OFF = 0] = "OFF", M[M.POW2 = 1] = "POW2", M[M.ON = 2] = "ON", M[M.ON_MANUAL = 3] = "ON_MANUAL", (I = O || (O = {}))[I.NPM = 0] = "NPM", I[I.UNPACK = 1] = "UNPACK", I[I.PMA = 2] = "PMA", I[I.NO_PREMULTIPLIED_ALPHA = 0] = "NO_PREMULTIPLIED_ALPHA", I[I.PREMULTIPLY_ON_UPLOAD = 1] = "PREMULTIPLY_ON_UPLOAD", I[I.PREMULTIPLY_ALPHA = 2] = "PREMULTIPLY_ALPHA", I[I.PREMULTIPLIED_ALPHA = 2] = "PREMULTIPLIED_ALPHA", (R = N || (N = {}))[R.NO = 0] = "NO", R[R.YES = 1] = "YES", R[R.AUTO = 2] = "AUTO", R[R.BLEND = 0] = "BLEND", R[R.CLEAR = 1] = "CLEAR", R[R.BLIT = 2] = "BLIT", (x = P || (P = {}))[x.AUTO = 0] = "AUTO", x[x.MANUAL = 1] = "MANUAL", (C = L || (L = {})).LOW = "lowp", C.MEDIUM = "mediump", C.HIGH = "highp", (k = U || (U = {}))[k.NONE = 0] = "NONE", k[k.SCISSOR = 1] = "SCISSOR", k[k.STENCIL = 2] = "STENCIL", k[k.SPRITE = 3] = "SPRITE", (B = F || (F = {}))[B.NONE = 0] = "NONE", B[B.LOW = 2] = "LOW", B[B.MEDIUM = 4] = "MEDIUM", B[B.HIGH = 8] = "HIGH", (j = D || (D = {}))[j.ELEMENT_ARRAY_BUFFER = 34963] = "ELEMENT_ARRAY_BUFFER", j[j.ARRAY_BUFFER = 34962] = "ARRAY_BUFFER", j[j.UNIFORM_BUFFER = 35345] = "UNIFORM_BUFFER" }, 4577: (t, i, n) => { "use strict"; n.d(i, { $r: () => Pt, Bv: () => Ei, Ie: () => _i, JZ: () => wi, TI: () => U, Th: () => ci, UX: () => kt, VL: () => m, Y9: () => vi, ZM: () => Lt, ZX: () => X, a$: () => di, e6: () => fi, ex: () => xt, lW: () => D, oo: () => z, wn: () => Ct, xE: () => C }); var s = n(3930), e = n(4936), r = n(6335), h = n(4433), o = n(8759), u = n(229); /*! * @pixi/core - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/core is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ s.X.PREFER_ENV = r.isMobile.any ? e.Vi.WEBGL : e.Vi.WEBGL2, s.X.STRICT_TEXTURE_CACHE = !1; var a = []; function l(t, i) { if (!t) return null; var n = ""; if ("string" == typeof t) { var s = /\.(\w{3,4})(?:$|\?|#)/i.exec(t); s && (n = s[1].toLowerCase()) } for (var e = a.length - 1; e >= 0; --e) { var r = a[e]; if (r.test && r.test(t, n)) return new r(t, i) } throw new Error("Unrecognized source type to auto-detect Resource") } /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var c = function(t, i) { return (c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]) })(t, i) }; function f(t, i) { function n() { this.constructor = t } c(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) } var v = function() { return v = Object.assign || function(t) { for (var i, n = arguments, s = 1, e = arguments.length; s < e; s++) for (var r in i = n[s]) Object.prototype.hasOwnProperty.call(i, r) && (t[r] = i[r]); return t }, v.apply(this, arguments) }; var d = function() { function t(t, i) { void 0 === t && (t = 0), void 0 === i && (i = 0), this.$ = t, this.J = i, this.destroyed = !1, this.internal = !1, this.onResize = new h.R("setRealSize"), this.onUpdate = new h.R("update"), this.onError = new h.R("onError") } return t.prototype.bind = function(t) { this.onResize.add(t), this.onUpdate.add(t), this.onError.add(t), (this.$ || this.J) && this.onResize.emit(this.$, this.J) }, t.prototype.unbind = function(t) { this.onResize.remove(t), this.onUpdate.remove(t), this.onError.remove(t) }, t.prototype.resize = function(t, i) { t === this.$ && i === this.J || (this.$ = t, this.J = i, this.onResize.emit(t, i)) }, Object.defineProperty(t.prototype, "valid", { get: function() { return !!this.$ && !!this.J }, enumerable: !1, configurable: !0 }), t.prototype.update = function() { this.destroyed || this.onUpdate.emit() }, t.prototype.load = function() { return Promise.resolve(this) }, Object.defineProperty(t.prototype, "width", { get: function() { return this.$ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "height", { get: function() { return this.J }, enumerable: !1, configurable: !0 }), t.prototype.style = function(t, i, n) { return !1 }, t.prototype.dispose = function() {}, t.prototype.destroy = function() { this.destroyed || (this.destroyed = !0, this.dispose(), this.onError.removeAll(), this.onError = null, this.onResize.removeAll(), this.onResize = null, this.onUpdate.removeAll(), this.onUpdate = null) }, t.test = function(t, i) { return !1 }, t }(), _ = function(t) { function i(i, n) { var s = this, e = n || {}, r = e.width, h = e.height; if (!r || !h) throw new Error("BufferResource width or height invalid"); return (s = t.call(this, r, h) || this).data = i, s } return f(i, t), i.prototype.upload = function(t, i, n) { var s = t.gl; s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, i.alphaMode === e.iw.UNPACK); var r = i.realWidth, h = i.realHeight; return n.width === r && n.height === h ? s.texSubImage2D(i.target, 0, 0, 0, r, h, i.format, n.type, this.data) : (n.width = r, n.height = h, s.texImage2D(i.target, 0, n.internalFormat, r, h, 0, i.format, n.type, this.data)), !0 }, i.prototype.dispose = function() { this.data = null }, i.test = function(t) { return t instanceof Float32Array || t instanceof Uint8Array || t instanceof Uint32Array }, i }(d), p = { scaleMode: e.aH.NEAREST, format: e.I2.RGBA, alphaMode: e.iw.NPM }, m = function(t) { function i(i, n) { void 0 === i && (i = null), void 0 === n && (n = null); var h = t.call(this) || this, o = (n = n || {}).alphaMode, u = n.mipmap, a = n.anisotropicLevel, c = n.scaleMode, f = n.width, v = n.height, _ = n.wrapMode, p = n.format, m = n.type, b = n.target, w = n.resolution; return !i || i instanceof d || ((i = l(i, n.resourceOptions)).internal = !0), h.resolution = w || s.X.RESOLUTION, h.width = Math.round((f || 0) * h.resolution) / h.resolution, h.height = Math.round((v || 0) * h.resolution) / h.resolution, h.tt = void 0 !== u ? u : s.X.MIPMAP_TEXTURES, h.anisotropicLevel = void 0 !== a ? a : s.X.ANISOTROPIC_LEVEL, h.it = _ || s.X.WRAP_MODE, h.nt = void 0 !== c ? c : s.X.SCALE_MODE, h.format = p || e.I2.RGBA, h.type = m || e.vK.UNSIGNED_BYTE, h.target = b || e.sp.TEXTURE_2D, h.alphaMode = void 0 !== o ? o : e.iw.UNPACK, h.uid = (0, r.uid)(), h.touched = 0, h.isPowerOfTwo = !1, h.st(), h.et = {}, h.dirtyId = 0, h.dirtyStyleId = 0, h.cacheId = null, h.valid = f > 0 && v > 0, h.textureCacheIds = [], h.destroyed = !1, h.resource = null, h.rt = 0, h.ht = 0, h.parentTextureArray = null, h.setResource(i), h } return f(i, t), Object.defineProperty(i.prototype, "realWidth", { get: function() { return Math.round(this.width * this.resolution) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "realHeight", { get: function() { return Math.round(this.height * this.resolution) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "mipmap", { get: function() { return this.tt }, set: function(t) { this.tt !== t && (this.tt = t, this.dirtyStyleId++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "scaleMode", { get: function() { return this.nt }, set: function(t) { this.nt !== t && (this.nt = t, this.dirtyStyleId++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "wrapMode", { get: function() { return this.it }, set: function(t) { this.it !== t && (this.it = t, this.dirtyStyleId++) }, enumerable: !1, configurable: !0 }), i.prototype.setStyle = function(t, i) { var n; return void 0 !== t && t !== this.scaleMode && (this.scaleMode = t, n = !0), void 0 !== i && i !== this.mipmap && (this.mipmap = i, n = !0), n && this.dirtyStyleId++, this }, i.prototype.setSize = function(t, i, n) { return this.setRealSize(t * (n = n || this.resolution), i * n, n) }, i.prototype.setRealSize = function(t, i, n) { return this.resolution = n || this.resolution, this.width = Math.round(t) / this.resolution, this.height = Math.round(i) / this.resolution, this.st(), this.update(), this }, i.prototype.st = function() { this.isPowerOfTwo = (0, r.isPow2)(this.realWidth) && (0, r.isPow2)(this.realHeight) }, i.prototype.setResolution = function(t) { var i = this.resolution; return i === t || (this.resolution = t, this.valid && (this.width = Math.round(this.width * i) / t, this.height = Math.round(this.height * i) / t, this.emit("update", this)), this.st()), this }, i.prototype.setResource = function(t) { if (this.resource === t) return this; if (this.resource) throw new Error("Resource can be set only once"); return t.bind(this), this.resource = t, this }, i.prototype.update = function() { this.valid ? (this.dirtyId++, this.dirtyStyleId++, this.emit("update", this)) : this.width > 0 && this.height > 0 && (this.valid = !0, this.emit("loaded", this), this.emit("update", this)) }, i.prototype.onError = function(t) { this.emit("error", this, t) }, i.prototype.destroy = function() { this.resource && (this.resource.unbind(this), this.resource.internal && this.resource.destroy(), this.resource = null), this.cacheId && (delete r.BaseTextureCache[this.cacheId], delete r.TextureCache[this.cacheId], this.cacheId = null), this.dispose(), i.removeFromCache(this), this.textureCacheIds = null, this.destroyed = !0 }, i.prototype.dispose = function() { this.emit("dispose", this) }, i.prototype.castToBaseTexture = function() { return this }, i.from = function(t, n, e) { void 0 === e && (e = s.X.STRICT_TEXTURE_CACHE); var h = "string" == typeof t, o = null; if (h) o = t; else { if (!t.ot) t.ot = (n && n.pixiIdPrefix || "pixiid") + "_" + (0, r.uid)(); o = t.ot } var u = r.BaseTextureCache[o]; if (h && e && !u) throw new Error('The cacheId "' + o + '" does not exist in BaseTextureCache.'); return u || ((u = new i(t, n)).cacheId = o, i.addToCache(u, o)), u }, i.fromBuffer = function(t, n, s, r) { t = t || new Float32Array(n * s * 4); var h = new _(t, { width: n, height: s }), o = t instanceof Float32Array ? e.vK.FLOAT : e.vK.UNSIGNED_BYTE; return new i(h, Object.assign(p, r || { width: n, height: s, type: o })) }, i.addToCache = function(t, i) { i && (-1 === t.textureCacheIds.indexOf(i) && t.textureCacheIds.push(i), r.BaseTextureCache[i] = t) }, i.removeFromCache = function(t) { if ("string" == typeof t) { var i = r.BaseTextureCache[t]; if (i) { var n = i.textureCacheIds.indexOf(t); return n > -1 && i.textureCacheIds.splice(n, 1), delete r.BaseTextureCache[t], i } } else if (t && t.textureCacheIds) { for (var s = 0; s < t.textureCacheIds.length; ++s) delete r.BaseTextureCache[t.textureCacheIds[s]]; return t.textureCacheIds.length = 0, t } return null }, i.ut = 0, i }(r.EventEmitter), b = function(t) { function i(i, n) { var s = this, e = n || {}; (s = t.call(this, e.width, e.height) || this).items = [], s.itemDirtyIds = []; for (var r = 0; r < i; r++) { var h = new m; s.items.push(h), s.itemDirtyIds.push(-2) } return s.length = i, s.lt = null, s.baseTexture = null, s } return f(i, t), i.prototype.initFromArray = function(t, i) { for (var n = 0; n < this.length; n++) t[n] && (t[n].castToBaseTexture ? this.addBaseTextureAt(t[n].castToBaseTexture(), n) : this.addResourceAt(t[n] instanceof d ? t[n] : l(t[n], i), n)) }, i.prototype.dispose = function() { for (var t = 0, i = this.length; t < i; t++) this.items[t].destroy(); this.items = null, this.itemDirtyIds = null, this.lt = null }, i.prototype.addResourceAt = function(t, i) { if (!this.items[i]) throw new Error("Index " + i + " is out of bounds"); return t.valid && !this.valid && this.resize(t.width, t.height), this.items[i].setResource(t), this }, i.prototype.bind = function(i) { if (null !== this.baseTexture) throw new Error("Only one base texture per TextureArray is allowed"); t.prototype.bind.call(this, i); for (var n = 0; n < this.length; n++) this.items[n].parentTextureArray = i, this.items[n].on("update", i.update, i) }, i.prototype.unbind = function(i) { t.prototype.unbind.call(this, i); for (var n = 0; n < this.length; n++) this.items[n].parentTextureArray = null, this.items[n].off("update", i.update, i) }, i.prototype.load = function() { var t = this; if (this.lt) return this.lt; var i = this.items.map((function(t) { return t.resource })).filter((function(t) { return t })).map((function(t) { return t.load() })); return this.lt = Promise.all(i).then((function() { var i = t.items[0]; return t.resize(i.realWidth, i.realHeight), Promise.resolve(t) })), this.lt }, i }(d), w = function(t) { function i(i, n) { var s, e, r = this, h = n || {}, o = h.width, u = h.height; return Array.isArray(i) ? (s = i, e = i.length) : e = i, r = t.call(this, e, { width: o, height: u }) || this, s && r.initFromArray(s, n), r } return f(i, t), i.prototype.addBaseTextureAt = function(t, i) { if (!t.resource) throw new Error("ArrayResource does not support RenderTexture"); return this.addResourceAt(t.resource, i), this }, i.prototype.bind = function(i) { t.prototype.bind.call(this, i), i.target = e.sp.TEXTURE_2D_ARRAY }, i.prototype.upload = function(t, i, n) { var s = this, e = s.length, r = s.itemDirtyIds, h = s.items, o = t.gl; n.dirtyId < 0 && o.texImage3D(o.TEXTURE_2D_ARRAY, 0, n.internalFormat, this.$, this.J, e, 0, i.format, n.type, null); for (var u = 0; u < e; u++) { var a = h[u]; r[u] < a.dirtyId && (r[u] = a.dirtyId, a.valid && o.texSubImage3D(o.TEXTURE_2D_ARRAY, 0, 0, 0, u, a.resource.width, a.resource.height, 1, i.format, n.type, a.resource.source)) } return !0 }, i }(b), g = function(t) { function i(i) { var n = this; return (n = t.call(this, i.naturalWidth || i.videoWidth || i.width, i.naturalHeight || i.videoHeight || i.height) || this).source = i, n.noSubImage = !1, n } return f(i, t), i.crossOrigin = function(t, i, n) { void 0 === n && 0 !== i.indexOf("data:") ? t.crossOrigin = (0, r.determineCrossOrigin)(i) : !1 !== n && (t.crossOrigin = "string" == typeof n ? n : "anonymous") }, i.prototype.upload = function(t, i, n, s) { var r = t.gl, h = i.realWidth, o = i.realHeight; if ((s = s || this.source) instanceof HTMLImageElement) { if (!s.complete || 0 === s.naturalWidth) return !1 } else if (s instanceof HTMLVideoElement && s.readyState <= 1) return !1; return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL, i.alphaMode === e.iw.UNPACK), this.noSubImage || i.target !== r.TEXTURE_2D || n.width !== h || n.height !== o ? (n.width = h, n.height = o, r.texImage2D(i.target, 0, n.internalFormat, i.format, n.type, s)) : r.texSubImage2D(r.TEXTURE_2D, 0, 0, 0, i.format, n.type, s), !0 }, i.prototype.update = function() { if (!this.destroyed) { var i = this.source; this.resize(i.naturalWidth || i.videoWidth || i.width, i.naturalHeight || i.videoHeight || i.height), t.prototype.update.call(this) } }, i.prototype.dispose = function() { this.source = null }, i }(d), y = function(t) { function i(i) { return t.call(this, i) || this } return f(i, t), i.test = function(t) { var i = globalThis.OffscreenCanvas; return !!(i && t instanceof i) || globalThis.HTMLCanvasElement && t instanceof HTMLCanvasElement }, i }(g), E = function(t) { function i(n, s) { var r = this, h = s || {}, o = h.width, u = h.height, a = h.autoLoad, l = h.linkBaseTexture; if (n && n.length !== i.SIDES) throw new Error("Invalid length. Got " + n.length + ", expected 6"); r = t.call(this, 6, { width: o, height: u }) || this; for (var c = 0; c < i.SIDES; c++) r.items[c].target = e.sp.TEXTURE_CUBE_MAP_POSITIVE_X + c; return r.linkBaseTexture = !1 !== l, n && r.initFromArray(n, s), !1 !== a && r.load(), r } return f(i, t), i.prototype.bind = function(i) { t.prototype.bind.call(this, i), i.target = e.sp.TEXTURE_CUBE_MAP }, i.prototype.addBaseTextureAt = function(t, i, n) { if (!this.items[i]) throw new Error("Index " + i + " is out of bounds"); if (!this.linkBaseTexture || t.parentTextureArray || Object.keys(t.et).length > 0) { if (!t.resource) throw new Error("CubeResource does not support copying of renderTexture."); this.addResourceAt(t.resource, i) } else t.target = e.sp.TEXTURE_CUBE_MAP_POSITIVE_X + i, t.parentTextureArray = this.baseTexture, this.items[i] = t; return t.valid && !this.valid && this.resize(t.realWidth, t.realHeight), this.items[i] = t, this }, i.prototype.upload = function(t, n, s) { for (var e = this.itemDirtyIds, r = 0; r < i.SIDES; r++) { var h = this.items[r]; e[r] < h.dirtyId && (h.valid && h.resource ? (h.resource.upload(t, h, s), e[r] = h.dirtyId) : e[r] < -1 && (t.gl.texImage2D(h.target, 0, s.internalFormat, n.realWidth, n.realHeight, 0, n.format, s.type, null), e[r] = -1)) } return !0 }, i.test = function(t) { return Array.isArray(t) && t.length === i.SIDES }, i.SIDES = 6, i }(b), S = function(t) { function i(i, n) { var e = this; if (n = n || {}, !(i instanceof HTMLImageElement)) { var r = new Image; g.crossOrigin(r, i, n.crossorigin), r.src = i, i = r } return e = t.call(this, i) || this, !i.complete && e.$ && e.J && (e.$ = 0, e.J = 0), e.url = i.src, e.ct = null, e.preserveBitmap = !1, e.createBitmap = (void 0 !== n.createBitmap ? n.createBitmap : s.X.CREATE_IMAGE_BITMAP) && !!globalThis.createImageBitmap, e.alphaMode = "number" == typeof n.alphaMode ? n.alphaMode : null, e.bitmap = null, e.lt = null, !1 !== n.autoLoad && e.load(), e } return f(i, t), i.prototype.load = function(t) { var i = this; return this.lt || (void 0 !== t && (this.createBitmap = t), this.lt = new Promise((function(t, n) { var s = i.source; i.url = s.src; var e = function() { i.destroyed || (s.onload = null, s.onerror = null, i.resize(s.width, s.height), i.lt = null, t(i.createBitmap ? i.process() : i)) }; s.complete && s.src ? e() : (s.onload = e, s.onerror = function(t) { n(t), i.onError.emit(t) }) }))), this.lt }, i.prototype.process = function() { var t = this, i = this.source; if (null !== this.ct) return this.ct; if (null !== this.bitmap || !globalThis.createImageBitmap) return Promise.resolve(this); var n = globalThis.createImageBitmap; return this.ct = fetch(i.src, { mode: !i.crossOrigin || "anonymous" === i.crossOrigin ? "cors" : "no-cors" }).then((function(t) { return t.blob() })).then((function(s) { return n(s, 0, 0, i.width, i.height, { premultiplyAlpha: t.alphaMode === e.iw.UNPACK ? "premultiply" : "none" }) })).then((function(i) { return t.destroyed ? Promise.reject() : (t.bitmap = i, t.update(), t.ct = null, Promise.resolve(t)) })), this.ct }, i.prototype.upload = function(i, n, s) { if ("number" == typeof this.alphaMode && (n.alphaMode = this.alphaMode), !this.createBitmap) return t.prototype.upload.call(this, i, n, s); if (!this.bitmap && (this.process(), !this.bitmap)) return !1; if (t.prototype.upload.call(this, i, n, s, this.bitmap), !this.preserveBitmap) { var e = !0, r = n.et; for (var h in r) { var o = r[h]; if (o !== s && o.dirtyId !== n.dirtyId) { e = !1; break } } e && (this.bitmap.close && this.bitmap.close(), this.bitmap = null) } return !0 }, i.prototype.dispose = function() { this.source.onload = null, this.source.onerror = null, t.prototype.dispose.call(this), this.bitmap && (this.bitmap.close(), this.bitmap = null), this.ct = null, this.lt = null }, i.test = function(t) { return "string" == typeof t || t instanceof HTMLImageElement }, i }(g), A = function(t) { function i(i, n) { var s = this; return n = n || {}, (s = t.call(this, document.createElement("canvas")) || this).$ = 0, s.J = 0, s.svg = i, s.scale = n.scale || 1, s.ft = n.width, s.vt = n.height, s.dt = null, s._t = n.crossorigin, s.lt = null, !1 !== n.autoLoad && s.load(), s } return f(i, t), i.prototype.load = function() { var t = this; return this.lt || (this.lt = new Promise((function(n) { if (t.dt = function() { t.resize(t.source.width, t.source.height), n(t) }, i.SVG_XML.test(t.svg.trim())) { if (!btoa) throw new Error("Your browser doesn't support base64 conversions."); t.svg = "data:image/svg+xml;base64," + btoa(unescape(encodeURIComponent(t.svg))) } t.bt() }))), this.lt }, i.prototype.bt = function() { var t = this, i = new Image; g.crossOrigin(i, this.svg, this._t), i.src = this.svg, i.onerror = function(n) { t.dt && (i.onerror = null, t.onError.emit(n)) }, i.onload = function() { if (t.dt) { var n = i.width, s = i.height; if (!n || !s) throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them."); var e = n * t.scale, h = s * t.scale; (t.ft || t.vt) && (e = t.ft || t.vt / s * n, h = t.vt || t.ft / n * s), e = Math.round(e), h = Math.round(h); var o = t.source; o.width = e, o.height = h, o.ot = "canvas_" + (0, r.uid)(), o.getContext("2d").drawImage(i, 0, 0, n, s, 0, 0, e, h), t.dt(), t.dt = null } } }, i.getSize = function(t) { var n = i.SVG_SIZE.exec(t), s = {}; return n && (s[n[1]] = Math.round(parseFloat(n[3])), s[n[5]] = Math.round(parseFloat(n[7]))), s }, i.prototype.dispose = function() { t.prototype.dispose.call(this), this.dt = null, this._t = null }, i.test = function(t, n) { return "svg" === n || "string" == typeof t && /^data:image\/svg\+xml(;(charset=utf8|utf8))?;base64/.test(t) || "string" == typeof t && i.SVG_XML.test(t) }, i.SVG_XML = /^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i, i }(g), T = function(t) { function i(n, s) { var e = this; if (s = s || {}, !(n instanceof HTMLVideoElement)) { var r = document.createElement("video"); r.setAttribute("preload", "auto"), r.setAttribute("webkit-playsinline", ""), r.setAttribute("playsinline", ""), "string" == typeof n && (n = [n]), g.crossOrigin(r, n[0].src || n[0], s.crossorigin); for (var h = 0; h < n.length; ++h) { var o = document.createElement("source"), u = n[h], a = u.src, l = u.mime, c = (a = a || n[h]).split("?").shift().toLowerCase(), f = c.slice(c.lastIndexOf(".") + 1); l = l || i.MIME_TYPES[f] || "video/" + f, o.src = a, o.type = l, r.appendChild(o) } n = r } return (e = t.call(this, n) || this).noSubImage = !0, e.I = !0, e.wt = !1, e.gt = s.updateFPS || 0, e.yt = 0, e.autoPlay = !1 !== s.autoPlay, e.lt = null, e.dt = null, e.Et = e.Et.bind(e), e.St = e.St.bind(e), !1 !== s.autoLoad && e.load(), e } return f(i, t), i.prototype.update = function(i) { this.destroyed || (this.yt = Math.floor(this.yt - o.vB.shared.elapsedMS * this.source.playbackRate), (!this.gt || this.yt <= 0) && (t.prototype.update.call(this), this.yt = this.gt ? Math.floor(1e3 / this.gt) : 0)) }, i.prototype.load = function() { var t = this; if (this.lt) return this.lt; var i = this.source; return (i.readyState === i.HAVE_ENOUGH_DATA || i.readyState === i.HAVE_FUTURE_DATA) && i.width && i.height && (i.complete = !0), i.addEventListener("play", this.At.bind(this)), i.addEventListener("pause", this.Tt.bind(this)), this.Mt() ? this.Et() : (i.addEventListener("canplay", this.Et), i.addEventListener("canplaythrough", this.Et), i.addEventListener("error", this.St, !0)), this.lt = new Promise((function(n) { t.valid ? n(t) : (t.dt = n, i.load()) })), this.lt }, i.prototype.St = function(t) { this.source.removeEventListener("error", this.St, !0), this.onError.emit(t) }, i.prototype.Ot = function() { var t = this.source; return t.currentTime > 0 && !1 === t.paused && !1 === t.ended && t.readyState > 2 }, i.prototype.Mt = function() { var t = this.source; return 3 === t.readyState || 4 === t.readyState }, i.prototype.At = function() { this.valid || this.Et(), this.autoUpdate && !this.wt && (o.vB.shared.add(this.update, this), this.wt = !0) }, i.prototype.Tt = function() { this.wt && (o.vB.shared.remove(this.update, this), this.wt = !1) }, i.prototype.Et = function() { var t = this.source; t.removeEventListener("canplay", this.Et), t.removeEventListener("canplaythrough", this.Et); var i = this.valid; this.resize(t.videoWidth, t.videoHeight), !i && this.dt && (this.dt(this), this.dt = null), this.Ot() ? this.At() : this.autoPlay && t.play() }, i.prototype.dispose = function() { this.wt && (o.vB.shared.remove(this.update, this), this.wt = !1); var i = this.source; i && (i.removeEventListener("error", this.St, !0), i.pause(), i.src = "", i.load()), t.prototype.dispose.call(this) }, Object.defineProperty(i.prototype, "autoUpdate", { get: function() { return this.I }, set: function(t) { t !== this.I && (this.I = t, !this.I && this.wt ? (o.vB.shared.remove(this.update, this), this.wt = !1) : this.I && !this.wt && this.Ot() && (o.vB.shared.add(this.update, this), this.wt = !0)) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "updateFPS", { get: function() { return this.gt }, set: function(t) { t !== this.gt && (this.gt = t) }, enumerable: !1, configurable: !0 }), i.test = function(t, n) { return globalThis.HTMLVideoElement && t instanceof HTMLVideoElement || i.TYPES.indexOf(n) > -1 }, i.TYPES = ["mp4", "m4v", "webm", "ogg", "ogv", "h264", "avi", "mov"], i.MIME_TYPES = { ogv: "video/ogg", mov: "video/quicktime", m4v: "video/mp4" }, i }(g), M = function(t) { function i(i) { return t.call(this, i) || this } return f(i, t), i.test = function(t) { return !!globalThis.createImageBitmap && t instanceof ImageBitmap }, i }(g); a.push(S, M, y, T, A, _, E, w); var O = { __proto__: null, Resource: d, BaseImageResource: g, INSTALLED: a, autoDetectResource: l, AbstractMultiResource: b, ArrayResource: w, BufferResource: _, CanvasResource: y, CubeResource: E, ImageResource: S, SVGResource: A, VideoResource: T, ImageBitmapResource: M }, I = function(t) { function i() { return null !== t && t.apply(this, arguments) || this } return f(i, t), i.prototype.upload = function(t, i, n) { var s = t.gl; s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, i.alphaMode === e.iw.UNPACK); var r = i.realWidth, h = i.realHeight; return n.width === r && n.height === h ? s.texSubImage2D(i.target, 0, 0, 0, r, h, i.format, n.type, this.data) : (n.width = r, n.height = h, s.texImage2D(i.target, 0, n.internalFormat, r, h, 0, i.format, n.type, this.data)), !0 }, i }(_), N = function() { function t(t, i) { this.width = Math.round(t || 100), this.height = Math.round(i || 100), this.stencil = !1, this.depth = !1, this.dirtyId = 0, this.dirtyFormat = 0, this.dirtySize = 0, this.depthTexture = null, this.colorTextures = [], this.glFramebuffers = {}, this.disposeRunner = new h.R("disposeFramebuffer"), this.multisample = e.G5.NONE } return Object.defineProperty(t.prototype, "colorTexture", { get: function() { return this.colorTextures[0] }, enumerable: !1, configurable: !0 }), t.prototype.addColorTexture = function(t, i) { return void 0 === t && (t = 0), this.colorTextures[t] = i || new m(null, { scaleMode: e.aH.NEAREST, resolution: 1, mipmap: e.WB.OFF, width: this.width, height: this.height }), this.dirtyId++, this.dirtyFormat++, this }, t.prototype.addDepthTexture = function(t) { return this.depthTexture = t || new m(new I(null, { width: this.width, height: this.height }), { scaleMode: e.aH.NEAREST, resolution: 1, width: this.width, height: this.height, mipmap: e.WB.OFF, format: e.I2.DEPTH_COMPONENT, type: e.vK.UNSIGNED_SHORT }), this.dirtyId++, this.dirtyFormat++, this }, t.prototype.enableDepth = function() { return this.depth = !0, this.dirtyId++, this.dirtyFormat++, this }, t.prototype.enableStencil = function() { return this.stencil = !0, this.dirtyId++, this.dirtyFormat++, this }, t.prototype.resize = function(t, i) { if (t = Math.round(t), i = Math.round(i), t !== this.width || i !== this.height) { this.width = t, this.height = i, this.dirtyId++, this.dirtySize++; for (var n = 0; n < this.colorTextures.length; n++) { var s = this.colorTextures[n]; s.setSize(t / (e = s.resolution), i / e) } var e; if (this.depthTexture) this.depthTexture.setSize(t / (e = this.depthTexture.resolution), i / e) } }, t.prototype.dispose = function() { this.disposeRunner.emit(this, !1) }, t.prototype.destroyDepthTexture = function() { this.depthTexture && (this.depthTexture.destroy(), this.depthTexture = null, ++this.dirtyId, ++this.dirtyFormat) }, t }(), R = function(t) { function i(i) { void 0 === i && (i = {}); var n = this; "number" == typeof i && (i = { width: arguments[0], height: arguments[1], scaleMode: arguments[2], resolution: arguments[3] }); return i.width = i.width || 100, i.height = i.height || 100, i.multisample = void 0 !== i.multisample ? i.multisample : e.G5.NONE, (n = t.call(this, null, i) || this).mipmap = e.WB.OFF, n.valid = !0, n.clearColor = [0, 0, 0, 0], n.framebuffer = new N(n.realWidth, n.realHeight).addColorTexture(0, n), n.framebuffer.multisample = i.multisample, n.maskStack = [], n.filterStack = [{}], n } return f(i, t), i.prototype.resize = function(t, i) { this.framebuffer.resize(t * this.resolution, i * this.resolution), this.setRealSize(this.framebuffer.width, this.framebuffer.height) }, i.prototype.dispose = function() { this.framebuffer.dispose(), t.prototype.dispose.call(this) }, i.prototype.destroy = function() { t.prototype.destroy.call(this), this.framebuffer.destroyDepthTexture(), this.framebuffer = null }, i }(m), P = function() { function t() { this.x0 = 0, this.y0 = 0, this.x1 = 1, this.y1 = 0, this.x2 = 1, this.y2 = 1, this.x3 = 0, this.y3 = 1, this.uvsFloat32 = new Float32Array(8) } return t.prototype.set = function(t, i, n) { var s = i.width, e = i.height; if (n) { var r = t.width / 2 / s, h = t.height / 2 / e, o = t.x / s + r, a = t.y / e + h; n = u.Lv.add(n, u.Lv.NW), this.x0 = o + r * u.Lv.uX(n), this.y0 = a + h * u.Lv.uY(n), n = u.Lv.add(n, 2), this.x1 = o + r * u.Lv.uX(n), this.y1 = a + h * u.Lv.uY(n), n = u.Lv.add(n, 2), this.x2 = o + r * u.Lv.uX(n), this.y2 = a + h * u.Lv.uY(n), n = u.Lv.add(n, 2), this.x3 = o + r * u.Lv.uX(n), this.y3 = a + h * u.Lv.uY(n) } else this.x0 = t.x / s, this.y0 = t.y / e, this.x1 = (t.x + t.width) / s, this.y1 = t.y / e, this.x2 = (t.x + t.width) / s, this.y2 = (t.y + t.height) / e, this.x3 = t.x / s, this.y3 = (t.y + t.height) / e; this.uvsFloat32[0] = this.x0, this.uvsFloat32[1] = this.y0, this.uvsFloat32[2] = this.x1, this.uvsFloat32[3] = this.y1, this.uvsFloat32[4] = this.x2, this.uvsFloat32[5] = this.y2, this.uvsFloat32[6] = this.x3, this.uvsFloat32[7] = this.y3 }, t.prototype.toString = function() { return "[@pixi/core:TextureUvs x0=" + this.x0 + " y0=" + this.y0 + " x1=" + this.x1 + " y1=" + this.y1 + " x2=" + this.x2 + " y2=" + this.y2 + " x3=" + this.x3 + " y3=" + this.y3 + "]" }, t }(), x = new P; function L(t) { t.destroy = function() {}, t.on = function() {}, t.once = function() {}, t.emit = function() {} } var C = function(t) { function i(n, s, e, r, h, o) { var a = t.call(this) || this; if (a.noFrame = !1, s || (a.noFrame = !0, s = new u.Ae(0, 0, 1, 1)), n instanceof i && (n = n.baseTexture), a.baseTexture = n, a.It = s, a.trim = r, a.valid = !1, a._ = x, a.uvMatrix = null, a.orig = e || s, a.Rt = Number(h || 0), !0 === h) a.Rt = 2; else if (a.Rt % 2 != 0) throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually"); return a.defaultAnchor = o ? new u.E9(o.x, o.y) : new u.E9(0, 0), a.Pt = 0, a.textureCacheIds = [], n.valid ? a.noFrame ? n.valid && a.onBaseTextureUpdated(n) : a.frame = s : n.once("loaded", a.onBaseTextureUpdated, a), a.noFrame && n.on("update", a.onBaseTextureUpdated, a), a } return f(i, t), i.prototype.update = function() { this.baseTexture.resource && this.baseTexture.resource.update() }, i.prototype.onBaseTextureUpdated = function(t) { if (this.noFrame) { if (!this.baseTexture.valid) return; this.It.width = t.width, this.It.height = t.height, this.valid = !0, this.updateUvs() } else this.frame = this.It; this.emit("update", this) }, i.prototype.destroy = function(t) { if (this.baseTexture) { if (t) { var n = this.baseTexture.resource; n && n.url && r.TextureCache[n.url] && i.removeFromCache(n.url), this.baseTexture.destroy() } this.baseTexture.off("loaded", this.onBaseTextureUpdated, this), this.baseTexture.off("update", this.onBaseTextureUpdated, this), this.baseTexture = null } this.It = null, this._ = null, this.trim = null, this.orig = null, this.valid = !1, i.removeFromCache(this), this.textureCacheIds = null }, i.prototype.clone = function() { var t = this.It.clone(), n = this.It === this.orig ? t : this.orig.clone(), s = new i(this.baseTexture, !this.noFrame && t, n, this.trim && this.trim.clone(), this.rotate, this.defaultAnchor); return this.noFrame && (s.It = t), s }, i.prototype.updateUvs = function() { this._ === x && (this._ = new P), this._.set(this.It, this.baseTexture, this.rotate), this.Pt++ }, i.from = function(t, n, e) { void 0 === n && (n = {}), void 0 === e && (e = s.X.STRICT_TEXTURE_CACHE); var h = "string" == typeof t, o = null; if (h) o = t; else if (t instanceof m) { if (!t.cacheId) t.cacheId = (n && n.pixiIdPrefix || "pixiid") + "-" + (0, r.uid)(), m.addToCache(t, t.cacheId); o = t.cacheId } else { if (!t.ot) t.ot = (n && n.pixiIdPrefix || "pixiid") + "_" + (0, r.uid)(); o = t.ot } var u = r.TextureCache[o]; if (h && e && !u) throw new Error('The cacheId "' + o + '" does not exist in TextureCache.'); return u || t instanceof m ? !u && t instanceof m && (u = new i(t), i.addToCache(u, o)) : (n.resolution || (n.resolution = (0, r.getResolutionOfUrl)(t)), (u = new i(new m(t, n))).baseTexture.cacheId = o, m.addToCache(u.baseTexture, o), i.addToCache(u, o)), u }, i.fromURL = function(t, n) { var s = Object.assign({ autoLoad: !1 }, null == n ? void 0 : n.resourceOptions), e = i.from(t, Object.assign({ resourceOptions: s }, n), !1), r = e.baseTexture.resource; return e.baseTexture.valid ? Promise.resolve(e) : r.load().then((function() { return Promise.resolve(e) })) }, i.fromBuffer = function(t, n, s, e) { return new i(m.fromBuffer(t, n, s, e)) }, i.fromLoader = function(t, n, e, h) { var o = new m(t, Object.assign({ scaleMode: s.X.SCALE_MODE, resolution: (0, r.getResolutionOfUrl)(n) }, h)), u = o.resource; u instanceof S && (u.url = n); var a = new i(o); return e || (e = n), m.addToCache(a.baseTexture, e), i.addToCache(a, e), e !== n && (m.addToCache(a.baseTexture, n), i.addToCache(a, n)), a.baseTexture.valid ? Promise.resolve(a) : new Promise((function(t) { a.baseTexture.once("loaded", (function() { return t(a) })) })) }, i.addToCache = function(t, i) { i && (-1 === t.textureCacheIds.indexOf(i) && t.textureCacheIds.push(i), r.TextureCache[i] = t) }, i.removeFromCache = function(t) { if ("string" == typeof t) { var i = r.TextureCache[t]; if (i) { var n = i.textureCacheIds.indexOf(t); return n > -1 && i.textureCacheIds.splice(n, 1), delete r.TextureCache[t], i } } else if (t && t.textureCacheIds) { for (var s = 0; s < t.textureCacheIds.length; ++s) r.TextureCache[t.textureCacheIds[s]] === t && delete r.TextureCache[t.textureCacheIds[s]]; return t.textureCacheIds.length = 0, t } return null }, Object.defineProperty(i.prototype, "resolution", { get: function() { return this.baseTexture.resolution }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "frame", { get: function() { return this.It }, set: function(t) { this.It = t, this.noFrame = !1; var i = t.x, n = t.y, s = t.width, e = t.height, r = i + s > this.baseTexture.width, h = n + e > this.baseTexture.height; if (r || h) throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: " + ("X: " + i + " + " + s + " = " + (i + s) + " > " + this.baseTexture.width) + " " + (r && h ? "and" : "or") + " " + ("Y: " + n + " + " + e + " = " + (n + e) + " > " + this.baseTexture.height)); this.valid = s && e && this.baseTexture.valid, this.trim || this.rotate || (this.orig = t), this.valid && this.updateUvs() }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "rotate", { get: function() { return this.Rt }, set: function(t) { this.Rt = t, this.valid && this.updateUvs() }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "width", { get: function() { return this.orig.width }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "height", { get: function() { return this.orig.height }, enumerable: !1, configurable: !0 }), i.prototype.castToBaseTexture = function() { return this.baseTexture }, Object.defineProperty(i, "EMPTY", { get: function() { return i.xt || (L(i.xt = new i(new m)), L(i.xt.baseTexture)), i.xt }, enumerable: !1, configurable: !0 }), Object.defineProperty(i, "WHITE", { get: function() { if (!i.Lt) { var t = document.createElement("canvas"), n = t.getContext("2d"); t.width = 16, t.height = 16, n.fillStyle = "white", n.fillRect(0, 0, 16, 16), L(i.Lt = new i(new m(new y(t)))), L(i.Lt.baseTexture) } return i.Lt }, enumerable: !1, configurable: !0 }), i }(r.EventEmitter), U = function(t) { function i(i, n) { var s = t.call(this, i, n) || this; return s.valid = !0, s.filterFrame = null, s.filterPoolKey = null, s.updateUvs(), s } return f(i, t), Object.defineProperty(i.prototype, "framebuffer", { get: function() { return this.baseTexture.framebuffer }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "multisample", { get: function() { return this.framebuffer.multisample }, set: function(t) { this.framebuffer.multisample = t }, enumerable: !1, configurable: !0 }), i.prototype.resize = function(t, i, n) { void 0 === n && (n = !0); var s = this.baseTexture.resolution, e = Math.round(t * s) / s, r = Math.round(i * s) / s; this.valid = e > 0 && r > 0, this.It.width = this.orig.width = e, this.It.height = this.orig.height = r, n && this.baseTexture.resize(e, r), this.updateUvs() }, i.prototype.setResolution = function(t) { var i = this.baseTexture; i.resolution !== t && (i.setResolution(t), this.resize(i.width, i.height, !1)) }, i.create = function(t) { for (var n = arguments, s = [], e = 1; e < arguments.length; e++) s[e - 1] = n[e]; return "number" == typeof t && ((0, r.deprecation)("6.0.0", "Arguments (width, height, scaleMode, resolution) have been deprecated."), t = { width: t, height: s[0], scaleMode: s[1], resolution: s[2] }), new i(new R(t)) }, i }(C), k = function() { function t(t) { this.texturePool = {}, this.textureOptions = t || {}, this.enableFullScreen = !1, this.Ct = 0, this.Ut = 0 } return t.prototype.createTexture = function(t, i, n) { void 0 === n && (n = e.G5.NONE); var s = new R(Object.assign({ width: t, height: i, resolution: 1, multisample: n }, this.textureOptions)); return new U(s) }, t.prototype.getOptimalTexture = function(t, i, n, s) { var h; void 0 === n && (n = 1), void 0 === s && (s = e.G5.NONE), t = Math.ceil(t * n - 1e-6), i = Math.ceil(i * n - 1e-6), this.enableFullScreen && t === this.Ct && i === this.Ut ? h = s > 1 ? -s : -1 : (h = ((65535 & (t = (0, r.nextPow2)(t))) << 16 | 65535 & (i = (0, r.nextPow2)(i))) >>> 0, s > 1 && (h += 4294967296 * s)), this.texturePool[h] || (this.texturePool[h] = []); var o = this.texturePool[h].pop(); return o || (o = this.createTexture(t, i, s)), o.filterPoolKey = h, o.setResolution(n), o }, t.prototype.getFilterTexture = function(t, i, n) { var s = this.getOptimalTexture(t.width, t.height, i || t.resolution, n || e.G5.NONE); return s.filterFrame = t.filterFrame, s }, t.prototype.returnTexture = function(t) { var i = t.filterPoolKey; t.filterFrame = null, this.texturePool[i].push(t) }, t.prototype.returnFilterTexture = function(t) { this.returnTexture(t) }, t.prototype.clear = function(t) { if (t = !1 !== t) for (var i in this.texturePool) { var n = this.texturePool[i]; if (n) for (var s = 0; s < n.length; s++) n[s].destroy(!0) } this.texturePool = {} }, t.prototype.setScreenSize = function(t) { if (t.width !== this.Ct || t.height !== this.Ut) { for (var i in this.enableFullScreen = t.width > 0 && t.height > 0, this.texturePool) if (Number(i) < 0) { var n = this.texturePool[i]; if (n) for (var s = 0; s < n.length; s++) n[s].destroy(!0); this.texturePool[i] = [] } this.Ct = t.width, this.Ut = t.height } }, t.SCREEN_KEY = -1, t }(), F = function() { function t(t, i, n, s, r, h, o) { void 0 === i && (i = 0), void 0 === n && (n = !1), void 0 === s && (s = e.vK.FLOAT), this.buffer = t, this.size = i, this.normalized = n, this.type = s, this.stride = r, this.start = h, this.instance = o } return t.prototype.destroy = function() { this.buffer = null }, t.from = function(i, n, s, e, r) { return new t(i, n, s, e, r) }, t }(), B = 0, D = function() { function t(t, i, n) { void 0 === i && (i = !0), void 0 === n && (n = !1), this.data = t || new Float32Array(1), this.kt = {}, this.Pt = 0, this.index = n, this.static = i, this.id = B++, this.disposeRunner = new h.R("disposeBuffer") } return t.prototype.update = function(t) { t instanceof Array && (t = new Float32Array(t)), this.data = t || this.data, this.Pt++ }, t.prototype.dispose = function() { this.disposeRunner.emit(this, !1) }, t.prototype.destroy = function() { this.dispose(), this.data = null }, Object.defineProperty(t.prototype, "index", { get: function() { return this.type === e.mr.ELEMENT_ARRAY_BUFFER }, set: function(t) { this.type = t ? e.mr.ELEMENT_ARRAY_BUFFER : e.mr.ARRAY_BUFFER }, enumerable: !1, configurable: !0 }), t.from = function(i) { return i instanceof Array && (i = new Float32Array(i)), new t(i) }, t }(), j = { Float32Array, Uint32Array, Int32Array, Uint8Array }; var G = { 5126: 4, 5123: 2, 5121: 1 }, W = 0, H = { Float32Array, Uint32Array, Int32Array, Uint8Array, Uint16Array }, X = function() { function t(t, i) { void 0 === t && (t = []), void 0 === i && (i = {}), this.buffers = t, this.indexBuffer = null, this.attributes = i, this.glVertexArrayObjects = {}, this.id = W++, this.instanced = !1, this.instanceCount = 1, this.disposeRunner = new h.R("disposeGeometry"), this.refCount = 0 } return t.prototype.addAttribute = function(t, i, n, s, e, r, h, o) { if (void 0 === n && (n = 0), void 0 === s && (s = !1), void 0 === o && (o = !1), !i) throw new Error("You must pass a buffer when creating an attribute"); i instanceof D || (i instanceof Array && (i = new Float32Array(i)), i = new D(i)); var u = t.split("|"); if (u.length > 1) { for (var a = 0; a < u.length; a++) this.addAttribute(u[a], i, n, s, e); return this } var l = this.buffers.indexOf(i); return -1 === l && (this.buffers.push(i), l = this.buffers.length - 1), this.attributes[t] = new F(l, n, s, e, r, h, o), this.instanced = this.instanced || o, this }, t.prototype.getAttribute = function(t) { return this.attributes[t] }, t.prototype.getBuffer = function(t) { return this.buffers[this.getAttribute(t).buffer] }, t.prototype.addIndex = function(t) { return t instanceof D || (t instanceof Array && (t = new Uint16Array(t)), t = new D(t)), t.type = e.mr.ELEMENT_ARRAY_BUFFER, this.indexBuffer = t, -1 === this.buffers.indexOf(t) && this.buffers.push(t), this }, t.prototype.getIndex = function() { return this.indexBuffer }, t.prototype.interleave = function() { if (1 === this.buffers.length || 2 === this.buffers.length && this.indexBuffer) return this; var t, i = [], n = [], s = new D; for (t in this.attributes) { var e = this.attributes[t]; i.push(this.buffers[e.buffer].data), n.push(e.size * G[e.type] / 4), e.buffer = 0 } for (s.data = function(t, i) { for (var n = 0, s = 0, e = {}, h = 0; h < t.length; h++) s += i[h], n += t[h].length; var o = new ArrayBuffer(4 * n), u = null, a = 0; for (h = 0; h < t.length; h++) { var l = i[h], c = t[h], f = (0, r.getBufferType)(c); e[f] || (e[f] = new j[f](o)), u = e[f]; for (var v = 0; v < c.length; v++) u[(v / l | 0) * s + a + v % l] = c[v]; a += l } return new Float32Array(o) }(i, n), t = 0; t < this.buffers.length; t++) this.buffers[t] !== this.indexBuffer && this.buffers[t].destroy(); return this.buffers = [s], this.indexBuffer && this.buffers.push(this.indexBuffer), this }, t.prototype.getSize = function() { for (var t in this.attributes) { var i = this.attributes[t]; return this.buffers[i.buffer].data.length / (i.stride / 4 || i.size) } return 0 }, t.prototype.dispose = function() { this.disposeRunner.emit(this, !1) }, t.prototype.destroy = function() { this.dispose(), this.buffers = null, this.indexBuffer = null, this.attributes = null }, t.prototype.clone = function() { for (var i = new t, n = 0; n < this.buffers.length; n++) i.buffers[n] = new D(this.buffers[n].data.slice(0)); for (var n in this.attributes) { var s = this.attributes[n]; i.attributes[n] = new F(s.buffer, s.size, s.normalized, s.type, s.stride, s.start, s.instance) } return this.indexBuffer && (i.indexBuffer = i.buffers[this.buffers.indexOf(this.indexBuffer)], i.indexBuffer.type = e.mr.ELEMENT_ARRAY_BUFFER), i }, t.merge = function(i) { for (var n, s = new t, h = [], o = [], u = [], a = 0; a < i.length; a++) { n = i[a]; for (var l = 0; l < n.buffers.length; l++) o[l] = o[l] || 0, o[l] += n.buffers[l].data.length, u[l] = 0 } for (a = 0; a < n.buffers.length; a++) h[a] = new(H[(0, r.getBufferType)(n.buffers[a].data)])(o[a]), s.buffers[a] = new D(h[a]); for (a = 0; a < i.length; a++) { n = i[a]; for (l = 0; l < n.buffers.length; l++) h[l].set(n.buffers[l].data, u[l]), u[l] += n.buffers[l].data.length } if (s.attributes = n.attributes, n.indexBuffer) { s.indexBuffer = s.buffers[n.buffers.indexOf(n.indexBuffer)], s.indexBuffer.type = e.mr.ELEMENT_ARRAY_BUFFER; var c = 0, f = 0, v = 0, d = 0; for (a = 0; a < n.buffers.length; a++) if (n.buffers[a] !== n.indexBuffer) { d = a; break } for (var a in n.attributes) { var _ = n.attributes[a]; (0 | _.buffer) === d && (f += _.size * G[_.type] / 4) } for (a = 0; a < i.length; a++) { var p = i[a].indexBuffer.data; for (l = 0; l < p.length; l++) s.indexBuffer.data[l + v] += c; c += i[a].buffers[d].data.length / f, v += p.length } } return s }, t }(), V = function(t) { function i() { var i = t.call(this) || this; return i.addAttribute("aVertexPosition", new Float32Array([0, 0, 1, 0, 1, 1, 0, 1])).addIndex([0, 1, 3, 2]), i } return f(i, t), i }(X), $ = function(t) { function i() { var i = t.call(this) || this; return i.vertices = new Float32Array([-1, -1, 1, -1, 1, 1, -1, 1]), i.uvs = new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]), i.vertexBuffer = new D(i.vertices), i.uvBuffer = new D(i.uvs), i.addAttribute("aVertexPosition", i.vertexBuffer).addAttribute("aTextureCoord", i.uvBuffer).addIndex([0, 1, 2, 0, 2, 3]), i } return f(i, t), i.prototype.map = function(t, i) { var n = 0, s = 0; return this.uvs[0] = n, this.uvs[1] = s, this.uvs[2] = n + i.width / t.width, this.uvs[3] = s, this.uvs[4] = n + i.width / t.width, this.uvs[5] = s + i.height / t.height, this.uvs[6] = n, this.uvs[7] = s + i.height / t.height, s = i.y, this.vertices[0] = n = i.x, this.vertices[1] = s, this.vertices[2] = n + i.width, this.vertices[3] = s, this.vertices[4] = n + i.width, this.vertices[5] = s + i.height, this.vertices[6] = n, this.vertices[7] = s + i.height, this.invalidate(), this }, i.prototype.invalidate = function() { return this.vertexBuffer.Pt++, this.uvBuffer.Pt++, this }, i }(X), Y = 0, z = function() { function t(t, i, n) { this.group = !0, this.syncUniforms = {}, this.dirtyId = 0, this.id = Y++, this.static = !!i, this.ubo = !!n, t instanceof D ? (this.buffer = t, this.buffer.type = e.mr.UNIFORM_BUFFER, this.autoManage = !1, this.ubo = !0) : (this.uniforms = t, this.ubo && (this.buffer = new D(new Float32Array(1)), this.buffer.type = e.mr.UNIFORM_BUFFER, this.autoManage = !0)) } return t.prototype.update = function() { this.dirtyId++, !this.autoManage && this.buffer && this.buffer.update() }, t.prototype.add = function(i, n, s) { if (this.ubo) throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them"); this.uniforms[i] = new t(n, s) }, t.from = function(i, n, s) { return new t(i, n, s) }, t.uboFrom = function(i, n) { return new t(i, null == n || n, !0) }, t }(), K = function() { function t() { this.renderTexture = null, this.target = null, this.legacy = !1, this.resolution = 1, this.multisample = e.G5.NONE, this.sourceFrame = new u.Ae, this.destinationFrame = new u.Ae, this.bindingSourceFrame = new u.Ae, this.bindingDestinationFrame = new u.Ae, this.filters = [], this.transform = null } return t.prototype.clear = function() { this.target = null, this.filters = null, this.renderTexture = null }, t }(), q = [new u.E9, new u.E9, new u.E9, new u.E9], Z = new u.y3, J = function() { function t(t) { this.renderer = t, this.defaultFilterStack = [{}], this.texturePool = new k, this.texturePool.setScreenSize(t.view), this.statePool = [], this.quad = new V, this.quadUv = new $, this.tempRect = new u.Ae, this.activeState = {}, this.globalUniforms = new z({ outputFrame: new u.Ae, inputSize: new Float32Array(4), inputPixel: new Float32Array(4), inputClamp: new Float32Array(4), resolution: 1, filterArea: new Float32Array(4), filterClamp: new Float32Array(4) }, !0), this.forceClear = !1, this.useMaxPadding = !1 } return t.prototype.push = function(t, i) { for (var n, s, e = this.renderer, r = this.defaultFilterStack, h = this.statePool.pop() || new K, o = this.renderer.renderTexture, u = i[0].resolution, a = i[0].multisample, l = i[0].padding, c = i[0].autoFit, f = null === (n = i[0].legacy) || void 0 === n || n, v = 1; v < i.length; v++) { var d = i[v]; u = Math.min(u, d.resolution), a = Math.min(a, d.multisample), l = this.useMaxPadding ? Math.max(l, d.padding) : l + d.padding, c = c && d.autoFit, f = f || null === (s = d.legacy) || void 0 === s || s } 1 === r.length && (this.defaultFilterStack[0].renderTexture = o.current), r.push(h), h.resolution = u, h.multisample = a, h.legacy = f, h.target = t, h.sourceFrame.copyFrom(t.filterArea || t.getBounds(!0)), h.sourceFrame.pad(l); var _ = this.tempRect.copyFrom(o.sourceFrame); e.projection.transform && this.transformAABB(Z.copyFrom(e.projection.transform).invert(), _), c ? (h.sourceFrame.fit(_), (h.sourceFrame.width <= 0 || h.sourceFrame.height <= 0) && (h.sourceFrame.width = 0, h.sourceFrame.height = 0)) : h.sourceFrame.intersects(_) || (h.sourceFrame.width = 0, h.sourceFrame.height = 0), this.roundFrame(h.sourceFrame, o.current ? o.current.resolution : e.resolution, o.sourceFrame, o.destinationFrame, e.projection.transform), h.renderTexture = this.getOptimalFilterTexture(h.sourceFrame.width, h.sourceFrame.height, u, a), h.filters = i, h.destinationFrame.width = h.renderTexture.width, h.destinationFrame.height = h.renderTexture.height; var p = this.tempRect; p.x = 0, p.y = 0, p.width = h.sourceFrame.width, p.height = h.sourceFrame.height, h.renderTexture.filterFrame = h.sourceFrame, h.bindingSourceFrame.copyFrom(o.sourceFrame), h.bindingDestinationFrame.copyFrom(o.destinationFrame), h.transform = e.projection.transform, e.projection.transform = null, o.bind(h.renderTexture, h.sourceFrame, p), e.framebuffer.clear(0, 0, 0, 0) }, t.prototype.pop = function() { var t = this.defaultFilterStack, i = t.pop(), n = i.filters; this.activeState = i; var s = this.globalUniforms.uniforms; s.outputFrame = i.sourceFrame, s.resolution = i.resolution; var r = s.inputSize, h = s.inputPixel, o = s.inputClamp; if (r[0] = i.destinationFrame.width, r[1] = i.destinationFrame.height, r[2] = 1 / r[0], r[3] = 1 / r[1], h[0] = Math.round(r[0] * i.resolution), h[1] = Math.round(r[1] * i.resolution), h[2] = 1 / h[0], h[3] = 1 / h[1], o[0] = .5 * h[2], o[1] = .5 * h[3], o[2] = i.sourceFrame.width * r[2] - .5 * h[2], o[3] = i.sourceFrame.height * r[3] - .5 * h[3], i.legacy) { var u = s.filterArea; u[0] = i.destinationFrame.width, u[1] = i.destinationFrame.height, u[2] = i.sourceFrame.x, u[3] = i.sourceFrame.y, s.filterClamp = s.inputClamp } this.globalUniforms.update(); var a = t[t.length - 1]; if (this.renderer.framebuffer.blit(), 1 === n.length) n[0].apply(this, i.renderTexture, a.renderTexture, e.yl.BLEND, i), this.returnFilterTexture(i.renderTexture); else { var l = i.renderTexture, c = this.getOptimalFilterTexture(l.width, l.height, i.resolution); c.filterFrame = l.filterFrame; var f = 0; for (f = 0; f < n.length - 1; ++f) { 1 === f && i.multisample > 1 && ((c = this.getOptimalFilterTexture(l.width, l.height, i.resolution)).filterFrame = l.filterFrame), n[f].apply(this, l, c, e.yl.CLEAR, i); var v = l; l = c, c = v } n[f].apply(this, l, a.renderTexture, e.yl.BLEND, i), f > 1 && i.multisample > 1 && this.returnFilterTexture(i.renderTexture), this.returnFilterTexture(l), this.returnFilterTexture(c) } i.clear(), this.statePool.push(i) }, t.prototype.bindAndClear = function(t, i) { void 0 === i && (i = e.yl.CLEAR); var n = this.renderer, s = n.renderTexture, r = n.state; if (this.renderer.projection.transform = t === this.defaultFilterStack[this.defaultFilterStack.length - 1].renderTexture ? this.activeState.transform : null, t && t.filterFrame) { var h = this.tempRect; h.x = 0, h.y = 0, h.width = t.filterFrame.width, h.height = t.filterFrame.height, s.bind(t, t.filterFrame, h) } else t !== this.defaultFilterStack[this.defaultFilterStack.length - 1].renderTexture ? s.bind(t) : this.renderer.renderTexture.bind(t, this.activeState.bindingSourceFrame, this.activeState.bindingDestinationFrame); (i === e.yl.CLEAR || i === e.yl.BLIT && (1 & r.stateId || this.forceClear)) && this.renderer.framebuffer.clear(0, 0, 0, 0) }, t.prototype.applyFilter = function(t, i, n, s) { var r = this.renderer; r.state.set(t.state), this.bindAndClear(n, s), t.uniforms.uSampler = i, t.uniforms.filterGlobals = this.globalUniforms, r.shader.bind(t), t.legacy = !!t.program.attributeData.aTextureCoord, t.legacy ? (this.quadUv.map(i.It, i.filterFrame), r.geometry.bind(this.quadUv), r.geometry.draw(e.lg.TRIANGLES)) : (r.geometry.bind(this.quad), r.geometry.draw(e.lg.TRIANGLE_STRIP)) }, t.prototype.calculateSpriteMatrix = function(t, i) { var n = this.activeState, s = n.sourceFrame, e = n.destinationFrame, r = i.Ft.orig, h = t.set(e.width, 0, 0, e.height, s.x, s.y), o = i.worldTransform.copyTo(u.y3.TEMP_MATRIX); return o.invert(), h.prepend(o), h.scale(1 / r.width, 1 / r.height), h.translate(i.anchor.x, i.anchor.y), h }, t.prototype.destroy = function() { this.renderer = null, this.texturePool.clear(!1) }, t.prototype.getOptimalFilterTexture = function(t, i, n, s) { return void 0 === n && (n = 1), void 0 === s && (s = e.G5.NONE), this.texturePool.getOptimalTexture(t, i, n, s) }, t.prototype.getFilterTexture = function(t, i, n) { if ("number" == typeof t) { var s = t; t = i, i = s } var r = this.texturePool.getOptimalTexture((t = t || this.activeState.renderTexture).width, t.height, i || t.resolution, n || e.G5.NONE); return r.filterFrame = t.filterFrame, r }, t.prototype.returnFilterTexture = function(t) { this.texturePool.returnTexture(t) }, t.prototype.emptyPool = function() { this.texturePool.clear(!0) }, t.prototype.resize = function() { this.texturePool.setScreenSize(this.renderer.view) }, t.prototype.transformAABB = function(t, i) { var n = q[0], s = q[1], e = q[2], r = q[3]; n.set(i.left, i.top), s.set(i.left, i.bottom), e.set(i.right, i.top), r.set(i.right, i.bottom), t.apply(n, n), t.apply(s, s), t.apply(e, e), t.apply(r, r); var h = Math.min(n.x, s.x, e.x, r.x), o = Math.min(n.y, s.y, e.y, r.y), u = Math.max(n.x, s.x, e.x, r.x), a = Math.max(n.y, s.y, e.y, r.y); i.x = h, i.y = o, i.width = u - h, i.height = a - o }, t.prototype.roundFrame = function(t, i, n, s, e) { if (!(t.width <= 0 || t.height <= 0 || n.width <= 0 || n.height <= 0)) { if (e) { var r = e.a, h = e.c, o = e.d; if ((Math.abs(e.b) > 1e-4 || Math.abs(h) > 1e-4) && (Math.abs(r) > 1e-4 || Math.abs(o) > 1e-4)) return }(e = e ? Z.copyFrom(e) : Z.identity()).translate(-n.x, -n.y).scale(s.width / n.width, s.height / n.height).translate(s.x, s.y), this.transformAABB(e, t), t.ceil(i), this.transformAABB(e.invert(), t) } }, t }(), Q = function() { function t(t) { this.renderer = t } return t.prototype.flush = function() {}, t.prototype.destroy = function() { this.renderer = null }, t.prototype.start = function() {}, t.prototype.stop = function() { this.flush() }, t.prototype.render = function(t) {}, t }(), tt = function() { function t(t) { this.renderer = t, this.emptyRenderer = new Q(t), this.currentRenderer = this.emptyRenderer } return t.prototype.setObjectRenderer = function(t) { this.currentRenderer !== t && (this.currentRenderer.stop(), this.currentRenderer = t, this.currentRenderer.start()) }, t.prototype.flush = function() { this.setObjectRenderer(this.emptyRenderer) }, t.prototype.reset = function() { this.setObjectRenderer(this.emptyRenderer) }, t.prototype.copyBoundTextures = function(t, i) { for (var n = this.renderer.texture.boundTextures, s = i - 1; s >= 0; --s) t[s] = n[s] || null, t[s] && (t[s].ht = s) }, t.prototype.boundArray = function(t, i, n, s) { for (var e = t.elements, r = t.ids, h = t.count, o = 0, u = 0; u < h; u++) { var a = e[u], l = a.ht; if (l >= 0 && l < s && i[l] === a) r[u] = l; else for (; o < s;) { var c = i[o]; if (!c || c.rt !== n || c.ht !== o) { r[u] = o, a.ht = o, i[o] = a; break } o++ } } }, t.prototype.destroy = function() { this.renderer = null }, t }(), it = 0, nt = function() { function t(t) { this.renderer = t, this.webGLVersion = 1, this.extensions = {}, this.supports = { uint32Indices: !1 }, this.handleContextLost = this.handleContextLost.bind(this), this.handleContextRestored = this.handleContextRestored.bind(this), t.view.addEventListener("webglcontextlost", this.handleContextLost, !1), t.view.addEventListener("webglcontextrestored", this.handleContextRestored, !1) } return Object.defineProperty(t.prototype, "isLost", { get: function() { return !this.gl || this.gl.isContextLost() }, enumerable: !1, configurable: !0 }), t.prototype.contextChange = function(t) { this.gl = t, this.renderer.gl = t, this.renderer.CONTEXT_UID = it++, t.isContextLost() && t.getExtension("WEBGL_lose_context") && t.getExtension("WEBGL_lose_context").restoreContext() }, t.prototype.initFromContext = function(t) { this.gl = t, this.validateContext(t), this.renderer.gl = t, this.renderer.CONTEXT_UID = it++, this.renderer.runners.contextChange.emit(t) }, t.prototype.initFromOptions = function(t) { var i = this.createContext(this.renderer.view, t); this.initFromContext(i) }, t.prototype.createContext = function(t, i) { var n; if (s.X.PREFER_ENV >= e.Vi.WEBGL2 && (n = t.getContext("webgl2", i)), n) this.webGLVersion = 2; else if (this.webGLVersion = 1, !(n = t.getContext("webgl", i) || t.getContext("experimental-webgl", i))) throw new Error("This browser does not support WebGL. Try using the canvas renderer"); return this.gl = n, this.getExtensions(), this.gl }, t.prototype.getExtensions = function() { var t = this.gl, i = { anisotropicFiltering: t.getExtension("EXT_texture_filter_anisotropic"), floatTextureLinear: t.getExtension("OES_texture_float_linear"), s3tc: t.getExtension("WEBGL_compressed_texture_s3tc"), s3tc_sRGB: t.getExtension("WEBGL_compressed_texture_s3tc_srgb"), etc: t.getExtension("WEBGL_compressed_texture_etc"), etc1: t.getExtension("WEBGL_compressed_texture_etc1"), pvrtc: t.getExtension("WEBGL_compressed_texture_pvrtc") || t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"), atc: t.getExtension("WEBGL_compressed_texture_atc"), astc: t.getExtension("WEBGL_compressed_texture_astc") }; 1 === this.webGLVersion ? Object.assign(this.extensions, i, { drawBuffers: t.getExtension("WEBGL_draw_buffers"), depthTexture: t.getExtension("WEBGL_depth_texture"), loseContext: t.getExtension("WEBGL_lose_context"), vertexArrayObject: t.getExtension("OES_vertex_array_object") || t.getExtension("MOZ_OES_vertex_array_object") || t.getExtension("WEBKIT_OES_vertex_array_object"), uint32ElementIndex: t.getExtension("OES_element_index_uint"), floatTexture: t.getExtension("OES_texture_float"), floatTextureLinear: t.getExtension("OES_texture_float_linear"), textureHalfFloat: t.getExtension("OES_texture_half_float"), textureHalfFloatLinear: t.getExtension("OES_texture_half_float_linear") }) : 2 === this.webGLVersion && Object.assign(this.extensions, i, { colorBufferFloat: t.getExtension("EXT_color_buffer_float") }) }, t.prototype.handleContextLost = function(t) { t.preventDefault() }, t.prototype.handleContextRestored = function() { this.renderer.runners.contextChange.emit(this.gl) }, t.prototype.destroy = function() { var t = this.renderer.view; this.renderer = null, t.removeEventListener("webglcontextlost", this.handleContextLost), t.removeEventListener("webglcontextrestored", this.handleContextRestored), this.gl.useProgram(null), this.extensions.loseContext && this.extensions.loseContext.loseContext() }, t.prototype.postrender = function() { this.renderer.renderingToScreen && this.gl.flush() }, t.prototype.validateContext = function(t) { t.getContextAttributes(); var i = "WebGL2RenderingContext" in globalThis && t instanceof globalThis.WebGL2RenderingContext; i && (this.webGLVersion = 2); var n = i || !!t.getExtension("OES_element_index_uint"); this.supports.uint32Indices = n }, t }(), st = function(t) { this.framebuffer = t, this.stencil = null, this.dirtyId = -1, this.dirtyFormat = -1, this.dirtySize = -1, this.multisample = e.G5.NONE, this.msaaBuffer = null, this.blitFramebuffer = null, this.mipLevel = 0 }, et = new u.Ae, rt = function() { function t(t) { this.renderer = t, this.managedFramebuffers = [], this.unknownFramebuffer = new N(10, 10), this.msaaSamples = null } return t.prototype.contextChange = function() { var t = this.gl = this.renderer.gl; if (this.CONTEXT_UID = this.renderer.CONTEXT_UID, this.current = this.unknownFramebuffer, this.viewport = new u.Ae, this.hasMRT = !0, this.writeDepthTexture = !0, this.disposeAll(!0), 1 === this.renderer.context.webGLVersion) { var i = this.renderer.context.extensions.drawBuffers, n = this.renderer.context.extensions.depthTexture; s.X.PREFER_ENV === e.Vi.WEBGL_LEGACY && (i = null, n = null), i ? t.drawBuffers = function(t) { return i.drawBuffersWEBGL(t) } : (this.hasMRT = !1, t.drawBuffers = function() {}), n || (this.writeDepthTexture = !1) } else this.msaaSamples = t.getInternalformatParameter(t.RENDERBUFFER, t.RGBA8, t.SAMPLES) }, t.prototype.bind = function(t, i, n) { void 0 === n && (n = 0); var s = this.gl; if (t) { var e = t.glFramebuffers[this.CONTEXT_UID] || this.initFramebuffer(t); this.current !== t && (this.current = t, s.bindFramebuffer(s.FRAMEBUFFER, e.framebuffer)), e.mipLevel !== n && (t.dirtyId++, t.dirtyFormat++, e.mipLevel = n), e.dirtyId !== t.dirtyId && (e.dirtyId = t.dirtyId, e.dirtyFormat !== t.dirtyFormat ? (e.dirtyFormat = t.dirtyFormat, e.dirtySize = t.dirtySize, this.updateFramebuffer(t, n)) : e.dirtySize !== t.dirtySize && (e.dirtySize = t.dirtySize, this.resizeFramebuffer(t))); for (var r = 0; r < t.colorTextures.length; r++) { var h = t.colorTextures[r]; this.renderer.texture.unbind(h.parentTextureArray || h) } if (t.depthTexture && this.renderer.texture.unbind(t.depthTexture), i) { var o = (u = i.width >> n) / i.width; this.setViewport(i.x * o, i.y * o, u, i.height >> n) } else { var u; this.setViewport(0, 0, u = t.width >> n, t.height >> n) } } else this.current && (this.current = null, s.bindFramebuffer(s.FRAMEBUFFER, null)), i ? this.setViewport(i.x, i.y, i.width, i.height) : this.setViewport(0, 0, this.renderer.width, this.renderer.height) }, t.prototype.setViewport = function(t, i, n, s) { var e = this.viewport; t = Math.round(t), i = Math.round(i), n = Math.round(n), s = Math.round(s), e.width === n && e.height === s && e.x === t && e.y === i || (e.x = t, e.y = i, e.width = n, e.height = s, this.gl.viewport(t, i, n, s)) }, Object.defineProperty(t.prototype, "size", { get: function() { return this.current ? { x: 0, y: 0, width: this.current.width, height: this.current.height } : { x: 0, y: 0, width: this.renderer.width, height: this.renderer.height } }, enumerable: !1, configurable: !0 }), t.prototype.clear = function(t, i, n, s, r) { void 0 === r && (r = e.V0.COLOR | e.V0.DEPTH); var h = this.gl; h.clearColor(t, i, n, s), h.clear(r) }, t.prototype.initFramebuffer = function(t) { var i = new st(this.gl.createFramebuffer()); return i.multisample = this.detectSamples(t.multisample), t.glFramebuffers[this.CONTEXT_UID] = i, this.managedFramebuffers.push(t), t.disposeRunner.add(this), i }, t.prototype.resizeFramebuffer = function(t) { var i = this.gl, n = t.glFramebuffers[this.CONTEXT_UID]; n.msaaBuffer && (i.bindRenderbuffer(i.RENDERBUFFER, n.msaaBuffer), i.renderbufferStorageMultisample(i.RENDERBUFFER, n.multisample, i.RGBA8, t.width, t.height)), n.stencil && (i.bindRenderbuffer(i.RENDERBUFFER, n.stencil), n.msaaBuffer ? i.renderbufferStorageMultisample(i.RENDERBUFFER, n.multisample, i.DEPTH24_STENCIL8, t.width, t.height) : i.renderbufferStorage(i.RENDERBUFFER, i.DEPTH_STENCIL, t.width, t.height)); var s = t.colorTextures, e = s.length; i.drawBuffers || (e = Math.min(e, 1)); for (var r = 0; r < e; r++) { var h = s[r]; this.renderer.texture.bind(h.parentTextureArray || h, 0) } t.depthTexture && this.writeDepthTexture && this.renderer.texture.bind(t.depthTexture, 0) }, t.prototype.updateFramebuffer = function(t, i) { var n = this.gl, s = t.glFramebuffers[this.CONTEXT_UID], e = t.colorTextures, r = e.length; n.drawBuffers || (r = Math.min(r, 1)), s.multisample > 1 && this.canMultisampleFramebuffer(t) ? (s.msaaBuffer = s.msaaBuffer || n.createRenderbuffer(), n.bindRenderbuffer(n.RENDERBUFFER, s.msaaBuffer), n.renderbufferStorageMultisample(n.RENDERBUFFER, s.multisample, n.RGBA8, t.width, t.height), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.COLOR_ATTACHMENT0, n.RENDERBUFFER, s.msaaBuffer)) : s.msaaBuffer && (n.deleteRenderbuffer(s.msaaBuffer), s.msaaBuffer = null, s.blitFramebuffer && (s.blitFramebuffer.dispose(), s.blitFramebuffer = null)); for (var h = [], o = 0; o < r; o++) { var u = e[o], a = u.parentTextureArray || u; this.renderer.texture.bind(a, 0), 0 === o && s.msaaBuffer || (n.framebufferTexture2D(n.FRAMEBUFFER, n.COLOR_ATTACHMENT0 + o, u.target, a.et[this.CONTEXT_UID].texture, i), h.push(n.COLOR_ATTACHMENT0 + o)) } if ((h.length > 1 && n.drawBuffers(h), t.depthTexture) && this.writeDepthTexture) { var l = t.depthTexture; this.renderer.texture.bind(l, 0), n.framebufferTexture2D(n.FRAMEBUFFER, n.DEPTH_ATTACHMENT, n.TEXTURE_2D, l.et[this.CONTEXT_UID].texture, i) }!t.stencil && !t.depth || t.depthTexture && this.writeDepthTexture ? s.stencil && (n.deleteRenderbuffer(s.stencil), s.stencil = null) : (s.stencil = s.stencil || n.createRenderbuffer(), n.bindRenderbuffer(n.RENDERBUFFER, s.stencil), s.msaaBuffer ? n.renderbufferStorageMultisample(n.RENDERBUFFER, s.multisample, n.DEPTH24_STENCIL8, t.width, t.height) : n.renderbufferStorage(n.RENDERBUFFER, n.DEPTH_STENCIL, t.width, t.height), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.RENDERBUFFER, s.stencil)) }, t.prototype.canMultisampleFramebuffer = function(t) { return 1 !== this.renderer.context.webGLVersion && t.colorTextures.length <= 1 && !t.depthTexture }, t.prototype.detectSamples = function(t) { var i = this.msaaSamples, n = e.G5.NONE; if (t <= 1 || null === i) return n; for (var s = 0; s < i.length; s++) if (i[s] <= t) { n = i[s]; break } return 1 === n && (n = e.G5.NONE), n }, t.prototype.blit = function(t, i, n) { var s = this, e = s.current, r = s.gl; if (2 === s.renderer.context.webGLVersion && e) { var h = e.glFramebuffers[s.CONTEXT_UID]; if (h) { if (!t) { if (!h.msaaBuffer) return; var o = e.colorTextures[0]; if (!o) return; h.blitFramebuffer || (h.blitFramebuffer = new N(e.width, e.height), h.blitFramebuffer.addColorTexture(0, o)), (t = h.blitFramebuffer).colorTextures[0] !== o && (t.colorTextures[0] = o, t.dirtyId++, t.dirtyFormat++), t.width === e.width && t.height === e.height || (t.width = e.width, t.height = e.height, t.dirtyId++, t.dirtySize++) } i || ((i = et).width = e.width, i.height = e.height), n || (n = i); var u = i.width === n.width && i.height === n.height; this.bind(t), r.bindFramebuffer(r.READ_FRAMEBUFFER, h.framebuffer), r.blitFramebuffer(i.left, i.top, i.right, i.bottom, n.left, n.top, n.right, n.bottom, r.COLOR_BUFFER_BIT, u ? r.NEAREST : r.LINEAR) } } }, t.prototype.disposeFramebuffer = function(t, i) { var n = t.glFramebuffers[this.CONTEXT_UID], s = this.gl; if (n) { delete t.glFramebuffers[this.CONTEXT_UID]; var e = this.managedFramebuffers.indexOf(t); e >= 0 && this.managedFramebuffers.splice(e, 1), t.disposeRunner.remove(this), i || (s.deleteFramebuffer(n.framebuffer), n.msaaBuffer && s.deleteRenderbuffer(n.msaaBuffer), n.stencil && s.deleteRenderbuffer(n.stencil)), n.blitFramebuffer && n.blitFramebuffer.dispose() } }, t.prototype.disposeAll = function(t) { var i = this.managedFramebuffers; this.managedFramebuffers = []; for (var n = 0; n < i.length; n++) this.disposeFramebuffer(i[n], t) }, t.prototype.forceStencil = function() { var t = this.current; if (t) { var i = t.glFramebuffers[this.CONTEXT_UID]; if (i && !i.stencil) { t.stencil = !0; var n = t.width, s = t.height, e = this.gl, r = e.createRenderbuffer(); e.bindRenderbuffer(e.RENDERBUFFER, r), i.msaaBuffer ? e.renderbufferStorageMultisample(e.RENDERBUFFER, i.multisample, e.DEPTH24_STENCIL8, n, s) : e.renderbufferStorage(e.RENDERBUFFER, e.DEPTH_STENCIL, n, s), i.stencil = r, e.framebufferRenderbuffer(e.FRAMEBUFFER, e.DEPTH_STENCIL_ATTACHMENT, e.RENDERBUFFER, r) } } }, t.prototype.reset = function() { this.current = this.unknownFramebuffer, this.viewport = new u.Ae }, t.prototype.destroy = function() { this.renderer = null }, t }(), ht = { 5126: 4, 5123: 2, 5121: 1 }, ot = function() { function t(t) { this.renderer = t, this.Bt = null, this.Dt = null, this.hasVao = !0, this.hasInstance = !0, this.canUseUInt32ElementIndex = !1, this.managedGeometries = {} } return t.prototype.contextChange = function() { this.disposeAll(!0); var t = this.gl = this.renderer.gl, i = this.renderer.context; if (this.CONTEXT_UID = this.renderer.CONTEXT_UID, 2 !== i.webGLVersion) { var n = this.renderer.context.extensions.vertexArrayObject; s.X.PREFER_ENV === e.Vi.WEBGL_LEGACY && (n = null), n ? (t.createVertexArray = function() { return n.createVertexArrayOES() }, t.bindVertexArray = function(t) { return n.bindVertexArrayOES(t) }, t.deleteVertexArray = function(t) { return n.deleteVertexArrayOES(t) }) : (this.hasVao = !1, t.createVertexArray = function() { return null }, t.bindVertexArray = function() { return null }, t.deleteVertexArray = function() { return null }) } if (2 !== i.webGLVersion) { var r = t.getExtension("ANGLE_instanced_arrays"); r ? (t.vertexAttribDivisor = function(t, i) { return r.vertexAttribDivisorANGLE(t, i) }, t.drawElementsInstanced = function(t, i, n, s, e) { return r.drawElementsInstancedANGLE(t, i, n, s, e) }, t.drawArraysInstanced = function(t, i, n, s) { return r.drawArraysInstancedANGLE(t, i, n, s) }) : this.hasInstance = !1 } this.canUseUInt32ElementIndex = 2 === i.webGLVersion || !!i.extensions.uint32ElementIndex }, t.prototype.bind = function(t, i) { i = i || this.renderer.shader.shader; var n = this.gl, s = t.glVertexArrayObjects[this.CONTEXT_UID], e = !1; s || (this.managedGeometries[t.id] = t, t.disposeRunner.add(this), t.glVertexArrayObjects[this.CONTEXT_UID] = s = {}, e = !0); var r = s[i.program.id] || this.initGeometryVao(t, i, e); this.Bt = t, this.Dt !== r && (this.Dt = r, this.hasVao ? n.bindVertexArray(r) : this.activateVao(t, i.program)), this.updateBuffers() }, t.prototype.reset = function() { this.unbind() }, t.prototype.updateBuffers = function() { for (var t = this.Bt, i = this.renderer.buffer, n = 0; n < t.buffers.length; n++) { i.update(t.buffers[n]) } }, t.prototype.checkCompatibility = function(t, i) { var n = t.attributes, s = i.attributeData; for (var e in s) if (!n[e]) throw new Error('shader and geometry incompatible, geometry missing the "' + e + '" attribute') }, t.prototype.getSignature = function(t, i) { var n = t.attributes, s = i.attributeData, e = ["g", t.id]; for (var r in n) s[r] && e.push(r, s[r].location); return e.join("-") }, t.prototype.initGeometryVao = function(t, i, n) { void 0 === n && (n = !0); var s = this.gl, e = this.CONTEXT_UID, r = this.renderer.buffer, h = i.program; h.glPrograms[e] || this.renderer.shader.generateProgram(i), this.checkCompatibility(t, h); var o = this.getSignature(t, h), u = t.glVertexArrayObjects[this.CONTEXT_UID], a = u[o]; if (a) return u[h.id] = a, a; var l = t.buffers, c = t.attributes, f = {}, v = {}; for (var d in l) f[d] = 0, v[d] = 0; for (var d in c) !c[d].size && h.attributeData[d] && (c[d].size = h.attributeData[d].size), f[c[d].buffer] += c[d].size * ht[c[d].type]; for (var d in c) { var _ = c[d], p = _.size; void 0 === _.stride && (_.stride = f[_.buffer] === p * ht[_.type] ? 0 : f[_.buffer]), void 0 === _.start && (_.start = v[_.buffer], v[_.buffer] += p * ht[_.type]) } a = s.createVertexArray(), s.bindVertexArray(a); for (var m = 0; m < l.length; m++) { var b = l[m]; r.bind(b), n && b.kt[e].refCount++ } return this.activateVao(t, h), this.Dt = a, u[h.id] = a, u[o] = a, a }, t.prototype.disposeGeometry = function(t, i) { var n; if (this.managedGeometries[t.id]) { delete this.managedGeometries[t.id]; var s = t.glVertexArrayObjects[this.CONTEXT_UID], e = this.gl, r = t.buffers, h = null === (n = this.renderer) || void 0 === n ? void 0 : n.buffer; if (t.disposeRunner.remove(this), s) { if (h) for (var o = 0; o < r.length; o++) { var u = r[o].kt[this.CONTEXT_UID]; u && (u.refCount--, 0 !== u.refCount || i || h.dispose(r[o], i)) } if (!i) for (var a in s) if ("g" === a[0]) { var l = s[a]; this.Dt === l && this.unbind(), e.deleteVertexArray(l) } delete t.glVertexArrayObjects[this.CONTEXT_UID] } } }, t.prototype.disposeAll = function(t) { for (var i = Object.keys(this.managedGeometries), n = 0; n < i.length; n++) this.disposeGeometry(this.managedGeometries[i[n]], t) }, t.prototype.activateVao = function(t, i) { var n = this.gl, s = this.CONTEXT_UID, e = this.renderer.buffer, r = t.buffers, h = t.attributes; t.indexBuffer && e.bind(t.indexBuffer); var o = null; for (var u in h) { var a = h[u], l = r[a.buffer], c = l.kt[s]; if (i.attributeData[u]) { o !== c && (e.bind(l), o = c); var f = i.attributeData[u].location; if (n.enableVertexAttribArray(f), n.vertexAttribPointer(f, a.size, a.type || n.FLOAT, a.normalized, a.stride, a.start), a.instance) { if (!this.hasInstance) throw new Error("geometry error, GPU Instancing is not supported on this device"); n.vertexAttribDivisor(f, 1) } } } }, t.prototype.draw = function(t, i, n, s) { var e = this.gl, r = this.Bt; if (r.indexBuffer) { var h = r.indexBuffer.data.BYTES_PER_ELEMENT, o = 2 === h ? e.UNSIGNED_SHORT : e.UNSIGNED_INT; (2 === h || 4 === h && this.canUseUInt32ElementIndex) && (r.instanced ? e.drawElementsInstanced(t, i || r.indexBuffer.data.length, o, (n || 0) * h, s || 1) : e.drawElements(t, i || r.indexBuffer.data.length, o, (n || 0) * h)) } else r.instanced ? e.drawArraysInstanced(t, n, i || r.getSize(), s || 1) : e.drawArrays(t, n, i || r.getSize()); return this }, t.prototype.unbind = function() { this.gl.bindVertexArray(null), this.Dt = null, this.Bt = null }, t.prototype.destroy = function() { this.renderer = null }, t }(), ut = function() { function t(t) { void 0 === t && (t = null), this.type = e.A7.NONE, this.autoDetect = !0, this.maskObject = t || null, this.pooled = !1, this.isMaskData = !0, this.resolution = null, this.multisample = s.X.FILTER_MULTISAMPLE, this.enabled = !0, this.jt = null, this.Gt = 0, this.Wt = 0, this.Ht = null, this.Xt = null, this.Vt = null } return Object.defineProperty(t.prototype, "filter", { get: function() { return this.jt ? this.jt[0] : null }, set: function(t) { t ? this.jt ? this.jt[0] = t : this.jt = [t] : this.jt = null }, enumerable: !1, configurable: !0 }), t.prototype.reset = function() { this.pooled && (this.maskObject = null, this.type = e.A7.NONE, this.autoDetect = !0), this.Vt = null, this.Xt = null }, t.prototype.copyCountersOrReset = function(t) { t ? (this.Gt = t.Gt, this.Wt = t.Wt, this.Ht = t.Ht) : (this.Gt = 0, this.Wt = 0, this.Ht = null) }, t }(); function at(t, i, n) { var s = t.createShader(i); return t.shaderSource(s, n), t.compileShader(s), s } function lt(t, i) { var n = t.getShaderSource(i).split("\n").map((function(t, i) { return i + ": " + t })), s = t.getShaderInfoLog(i), e = s.split("\n"), r = {}, h = e.map((function(t) { return parseFloat(t.replace(/^ERROR\: 0\:([\d]+)\:.*$/, "$1")) })).filter((function(t) { return !(!t || r[t]) && (r[t] = !0, !0) })), o = [""]; h.forEach((function(t) { n[t - 1] = "%c" + n[t - 1] + "%c", o.push("background: #FF0000; color:#FFFFFF; font-size: 10px", "font-size: 10px") })); var u = n.join("\n"); o[0] = u, console.groupCollapsed("click to view full shader code"), console.warn.apply(console, o), console.groupEnd() } function ct(t) { for (var i = new Array(t), n = 0; n < i.length; n++) i[n] = !1; return i } function ft(t, i) { switch (t) { case "float": case "int": case "uint": case "sampler2D": case "sampler2DArray": return 0; case "vec2": return new Float32Array(2 * i); case "vec3": return new Float32Array(3 * i); case "vec4": return new Float32Array(4 * i); case "ivec2": return new Int32Array(2 * i); case "ivec3": return new Int32Array(3 * i); case "ivec4": return new Int32Array(4 * i); case "uvec2": return new Uint32Array(2 * i); case "uvec3": return new Uint32Array(3 * i); case "uvec4": return new Uint32Array(4 * i); case "bool": return !1; case "bvec2": return ct(2 * i); case "bvec3": return ct(3 * i); case "bvec4": return ct(4 * i); case "mat2": return new Float32Array([1, 0, 0, 1]); case "mat3": return new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]); case "mat4": return new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]) } return null } var vt, dt = {}, _t = dt; function pt() { if (!vt) { vt = e.cB.MEDIUM; var t = function() { if (_t === dt || _t && _t.isContextLost()) { var t = document.createElement("canvas"), i = void 0; s.X.PREFER_ENV >= e.Vi.WEBGL2 && (i = t.getContext("webgl2", {})), i || ((i = t.getContext("webgl", {}) || t.getContext("experimental-webgl", {})) ? i.getExtension("WEBGL_draw_buffers") : i = null), _t = i } return _t }(); if (t && t.getShaderPrecisionFormat) { var i = t.getShaderPrecisionFormat(t.FRAGMENT_SHADER, t.HIGH_FLOAT); vt = i.precision ? e.cB.HIGH : e.cB.MEDIUM } } return vt } function mt(t, i, n) { if ("precision" !== t.substring(0, 9)) { var s = i; return i === e.cB.HIGH && n !== e.cB.HIGH && (s = e.cB.MEDIUM), "precision " + s + " float;\n" + t } return n !== e.cB.HIGH && "precision highp" === t.substring(0, 15) ? t.replace("precision highp", "precision mediump") : t } var bt = { float: 1, vec2: 2, vec3: 3, vec4: 4, int: 1, ivec2: 2, ivec3: 3, ivec4: 4, uint: 1, uvec2: 2, uvec3: 3, uvec4: 4, bool: 1, bvec2: 2, bvec3: 3, bvec4: 4, mat2: 4, mat3: 9, mat4: 16, sampler2D: 1 }; function wt(t) { return bt[t] } var gt = null, yt = { FLOAT: "float", FLOAT_VEC2: "vec2", FLOAT_VEC3: "vec3", FLOAT_VEC4: "vec4", INT: "int", INT_VEC2: "ivec2", INT_VEC3: "ivec3", INT_VEC4: "ivec4", UNSIGNED_INT: "uint", UNSIGNED_INT_VEC2: "uvec2", UNSIGNED_INT_VEC3: "uvec3", UNSIGNED_INT_VEC4: "uvec4", BOOL: "bool", BOOL_VEC2: "bvec2", BOOL_VEC3: "bvec3", BOOL_VEC4: "bvec4", FLOAT_MAT2: "mat2", FLOAT_MAT3: "mat3", FLOAT_MAT4: "mat4", SAMPLER_2D: "sampler2D", INT_SAMPLER_2D: "sampler2D", UNSIGNED_INT_SAMPLER_2D: "sampler2D", SAMPLER_CUBE: "samplerCube", INT_SAMPLER_CUBE: "samplerCube", UNSIGNED_INT_SAMPLER_CUBE: "samplerCube", SAMPLER_2D_ARRAY: "sampler2DArray", INT_SAMPLER_2D_ARRAY: "sampler2DArray", UNSIGNED_INT_SAMPLER_2D_ARRAY: "sampler2DArray" }; function Et(t, i) { if (!gt) { var n = Object.keys(yt); gt = {}; for (var s = 0; s < n.length; ++s) { var e = n[s]; gt[t[e]] = yt[e] } } return gt[i] } var St = [{ test: function(t) { return "float" === t.type && 1 === t.size }, code: function(t) { return '\n if(uv["' + t + '"] !== ud["' + t + '"].value)\n {\n ud["' + t + '"].value = uv["' + t + '"]\n gl.uniform1f(ud["' + t + '"].location, uv["' + t + '"])\n }\n ' } }, { test: function(t) { return ("sampler2D" === t.type || "samplerCube" === t.type || "sampler2DArray" === t.type) && 1 === t.size && !t.isArray }, code: function(t) { return 't = syncData.textureCount++;\n\n renderer.texture.bind(uv["' + t + '"], t);\n\n if(ud["' + t + '"].value !== t)\n {\n ud["' + t + '"].value = t;\n gl.uniform1i(ud["' + t + '"].location, t);\n; // eslint-disable-line max-len\n }' } }, { test: function(t, i) { return "mat3" === t.type && 1 === t.size && void 0 !== i.a }, code: function(t) { return '\n gl.uniformMatrix3fv(ud["' + t + '"].location, false, uv["' + t + '"].toArray(true));\n ' }, codeUbo: function(t) { return "\n var " + t + "_matrix = uv." + t + ".toArray(true);\n\n data[offset] = " + t + "_matrix[0];\n data[offset+1] = " + t + "_matrix[1];\n data[offset+2] = " + t + "_matrix[2];\n \n data[offset + 4] = " + t + "_matrix[3];\n data[offset + 5] = " + t + "_matrix[4];\n data[offset + 6] = " + t + "_matrix[5];\n \n data[offset + 8] = " + t + "_matrix[6];\n data[offset + 9] = " + t + "_matrix[7];\n data[offset + 10] = " + t + "_matrix[8];\n " } }, { test: function(t, i) { return "vec2" === t.type && 1 === t.size && void 0 !== i.x }, code: function(t) { return '\n cv = ud["' + t + '"].value;\n v = uv["' + t + '"];\n\n if(cv[0] !== v.x || cv[1] !== v.y)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud["' + t + '"].location, v.x, v.y);\n }' }, codeUbo: function(t) { return "\n v = uv." + t + ";\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n " } }, { test: function(t) { return "vec2" === t.type && 1 === t.size }, code: function(t) { return '\n cv = ud["' + t + '"].value;\n v = uv["' + t + '"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(ud["' + t + '"].location, v[0], v[1]);\n }\n ' } }, { test: function(t, i) { return "vec4" === t.type && 1 === t.size && void 0 !== i.width }, code: function(t) { return '\n cv = ud["' + t + '"].value;\n v = uv["' + t + '"];\n\n if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud["' + t + '"].location, v.x, v.y, v.width, v.height)\n }' }, codeUbo: function(t) { return "\n v = uv." + t + ";\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n data[offset+2] = v.width;\n data[offset+3] = v.height;\n " } }, { test: function(t) { return "vec4" === t.type && 1 === t.size }, code: function(t) { return '\n cv = ud["' + t + '"].value;\n v = uv["' + t + '"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(ud["' + t + '"].location, v[0], v[1], v[2], v[3])\n }' } }], At = { float: "\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1f(location, v);\n }", vec2: "\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2f(location, v[0], v[1])\n }", vec3: "\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3f(location, v[0], v[1], v[2])\n }", vec4: "\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(location, v[0], v[1], v[2], v[3]);\n }", int: "\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }", ivec2: "\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }", ivec3: "\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }", ivec4: "\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }", uint: "\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1ui(location, v);\n }", uvec2: "\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2ui(location, v[0], v[1]);\n }", uvec3: "\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3ui(location, v[0], v[1], v[2]);\n }", uvec4: "\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4ui(location, v[0], v[1], v[2], v[3]);\n }", bool: "\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1i(location, v);\n }", bvec2: "\n if (cv[0] != v[0] || cv[1] != v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }", bvec3: "\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }", bvec4: "\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }", mat2: "gl.uniformMatrix2fv(location, false, v)", mat3: "gl.uniformMatrix3fv(location, false, v)", mat4: "gl.uniformMatrix4fv(location, false, v)", sampler2D: "gl.uniform1i(location, v)", samplerCube: "gl.uniform1i(location, v)", sampler2DArray: "gl.uniform1i(location, v)" }, Tt = { float: "gl.uniform1fv(location, v)", vec2: "gl.uniform2fv(location, v)", vec3: "gl.uniform3fv(location, v)", vec4: "gl.uniform4fv(location, v)", mat4: "gl.uniformMatrix4fv(location, false, v)", mat3: "gl.uniformMatrix3fv(location, false, v)", mat2: "gl.uniformMatrix2fv(location, false, v)", int: "gl.uniform1iv(location, v)", ivec2: "gl.uniform2iv(location, v)", ivec3: "gl.uniform3iv(location, v)", ivec4: "gl.uniform4iv(location, v)", uint: "gl.uniform1uiv(location, v)", uvec2: "gl.uniform2uiv(location, v)", uvec3: "gl.uniform3uiv(location, v)", uvec4: "gl.uniform4uiv(location, v)", bool: "gl.uniform1iv(location, v)", bvec2: "gl.uniform2iv(location, v)", bvec3: "gl.uniform3iv(location, v)", bvec4: "gl.uniform4iv(location, v)", sampler2D: "gl.uniform1iv(location, v)", samplerCube: "gl.uniform1iv(location, v)", sampler2DArray: "gl.uniform1iv(location, v)" }; var Mt, Ot = ["precision mediump float;", "void main(void){", "float test = 0.1;", "%forloop%", "gl_FragColor = vec4(0.0);", "}"].join("\n"); function It(t) { for (var i = "", n = 0; n < t; ++n) n > 0 && (i += "\nelse "), n < t - 1 && (i += "if(test == " + n + ".0){}"); return i } var Nt = 0, Rt = {}, Pt = function() { function t(i, n, r) { void 0 === r && (r = "pixi-shader"), this.id = Nt++, this.vertexSrc = i || t.defaultVertexSrc, this.fragmentSrc = n || t.defaultFragmentSrc, this.vertexSrc = this.vertexSrc.trim(), this.fragmentSrc = this.fragmentSrc.trim(), "#version" !== this.vertexSrc.substring(0, 8) && (r = r.replace(/\s+/g, "-"), Rt[r] ? (Rt[r]++, r += "-" + Rt[r]) : Rt[r] = 1, this.vertexSrc = "#define SHADER_NAME " + r + "\n" + this.vertexSrc, this.fragmentSrc = "#define SHADER_NAME " + r + "\n" + this.fragmentSrc, this.vertexSrc = mt(this.vertexSrc, s.X.PRECISION_VERTEX, e.cB.HIGH), this.fragmentSrc = mt(this.fragmentSrc, s.X.PRECISION_FRAGMENT, pt())), this.glPrograms = {}, this.syncUniforms = null } return Object.defineProperty(t, "defaultVertexSrc", { get: function() { return "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n" }, enumerable: !1, configurable: !0 }), Object.defineProperty(t, "defaultFragmentSrc", { get: function() { return "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}" }, enumerable: !1, configurable: !0 }), t.from = function(i, n, s) { var e = i + n, h = r.ProgramCache[e]; return h || (r.ProgramCache[e] = h = new t(i, n, s)), h }, t }(), xt = function() { function t(t, i) { this.uniformBindCount = 0, this.program = t, this.uniformGroup = i ? i instanceof z ? i : new z(i) : new z({}) } return t.prototype.checkUniformExists = function(t, i) { if (i.uniforms[t]) return !0; for (var n in i.uniforms) { var s = i.uniforms[n]; if (s.group && this.checkUniformExists(t, s)) return !0 } return !1 }, t.prototype.destroy = function() { this.uniformGroup = null }, Object.defineProperty(t.prototype, "uniforms", { get: function() { return this.uniformGroup.uniforms }, enumerable: !1, configurable: !0 }), t.from = function(i, n, s) { return new t(Pt.from(i, n), s) }, t }(), Lt = function() { function t() { this.data = 0, this.blendMode = e.T$.NORMAL, this.polygonOffset = 0, this.blend = !0, this.depthMask = !0 } return Object.defineProperty(t.prototype, "blend", { get: function() { return !!(1 & this.data) }, set: function(t) { !!(1 & this.data) !== t && (this.data ^= 1) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "offsets", { get: function() { return !!(2 & this.data) }, set: function(t) { !!(2 & this.data) !== t && (this.data ^= 2) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "culling", { get: function() { return !!(4 & this.data) }, set: function(t) { !!(4 & this.data) !== t && (this.data ^= 4) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "depthTest", { get: function() { return !!(8 & this.data) }, set: function(t) { !!(8 & this.data) !== t && (this.data ^= 8) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "depthMask", { get: function() { return !!(32 & this.data) }, set: function(t) { !!(32 & this.data) !== t && (this.data ^= 32) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "clockwiseFrontFace", { get: function() { return !!(16 & this.data) }, set: function(t) { !!(16 & this.data) !== t && (this.data ^= 16) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "blendMode", { get: function() { return this.$t }, set: function(t) { this.blend = t !== e.T$.NONE, this.$t = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "polygonOffset", { get: function() { return this.Yt }, set: function(t) { this.offsets = !!t, this.Yt = t }, enumerable: !1, configurable: !0 }), t.prototype.toString = function() { return "[@pixi/core:State blendMode=" + this.blendMode + " clockwiseFrontFace=" + this.clockwiseFrontFace + " culling=" + this.culling + " depthMask=" + this.depthMask + " polygonOffset=" + this.polygonOffset + "]" }, t.for2d = function() { var i = new t; return i.depthTest = !1, i.blend = !0, i }, t }(), Ct = function(t) { function i(n, e, r) { var h = this, o = Pt.from(n || i.defaultVertexSrc, e || i.defaultFragmentSrc); return (h = t.call(this, o, r) || this).padding = 0, h.resolution = s.X.FILTER_RESOLUTION, h.multisample = s.X.FILTER_MULTISAMPLE, h.enabled = !0, h.autoFit = !0, h.state = new Lt, h } return f(i, t), i.prototype.apply = function(t, i, n, s, e) { t.applyFilter(this, i, n, s) }, Object.defineProperty(i.prototype, "blendMode", { get: function() { return this.state.blendMode }, set: function(t) { this.state.blendMode = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "resolution", { get: function() { return this.zt }, set: function(t) { this.zt = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i, "defaultVertexSrc", { get: function() { return "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n" }, enumerable: !1, configurable: !0 }), Object.defineProperty(i, "defaultFragmentSrc", { get: function() { return "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n" }, enumerable: !1, configurable: !0 }), i }(xt), Ut = new u.y3, kt = function() { function t(t, i) { this.Ft = t, this.mapCoord = new u.y3, this.uClampFrame = new Float32Array(4), this.uClampOffset = new Float32Array(2), this.Kt = -1, this.Pt = 0, this.clampOffset = 0, this.clampMargin = void 0 === i ? .5 : i, this.isSimple = !1 } return Object.defineProperty(t.prototype, "texture", { get: function() { return this.Ft }, set: function(t) { this.Ft = t, this.Kt = -1 }, enumerable: !1, configurable: !0 }), t.prototype.multiplyUvs = function(t, i) { void 0 === i && (i = t); for (var n = this.mapCoord, s = 0; s < t.length; s += 2) { var e = t[s], r = t[s + 1]; i[s] = e * n.a + r * n.c + n.tx, i[s + 1] = e * n.b + r * n.d + n.ty } return i }, t.prototype.update = function(t) { var i = this.Ft; if (!i || !i.valid) return !1; if (!t && this.Kt === i.Pt) return !1; this.Kt = i.Pt, this.Pt++; var n = i._; this.mapCoord.set(n.x1 - n.x0, n.y1 - n.y0, n.x3 - n.x0, n.y3 - n.y0, n.x0, n.y0); var s = i.orig, e = i.trim; e && (Ut.set(s.width / e.width, 0, 0, s.height / e.height, -e.x / e.width, -e.y / e.height), this.mapCoord.append(Ut)); var r = i.baseTexture, h = this.uClampFrame, o = this.clampMargin / r.resolution, u = this.clampOffset; return h[0] = (i.It.x + o + u) / r.width, h[1] = (i.It.y + o + u) / r.height, h[2] = (i.It.x + i.It.width - o + u) / r.width, h[3] = (i.It.y + i.It.height - o + u) / r.height, this.uClampOffset[0] = u / r.realWidth, this.uClampOffset[1] = u / r.realHeight, this.isSimple = i.It.width === r.width && i.It.height === r.height && 0 === i.rotate, !0 }, t }(), Ft = function(t) { function i(i, n, s) { var e = this, r = null; return "string" != typeof i && void 0 === n && void 0 === s && (r = i, i = void 0, n = void 0, s = void 0), (e = t.call(this, i || "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n", n || "varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n original *= (alphaMul * masky.r * alpha * clip);\n\n gl_FragColor = original;\n}\n", s) || this).maskSprite = r, e.maskMatrix = new u.y3, e } return f(i, t), Object.defineProperty(i.prototype, "maskSprite", { get: function() { return this.qt }, set: function(t) { this.qt = t, this.qt && (this.qt.renderable = !1) }, enumerable: !1, configurable: !0 }), i.prototype.apply = function(t, i, n, s) { var e = this.qt, r = e.Ft; r.valid && (r.uvMatrix || (r.uvMatrix = new kt(r, 0)), r.uvMatrix.update(), this.uniforms.npmAlpha = r.baseTexture.alphaMode ? 0 : 1, this.uniforms.mask = r, this.uniforms.otherMatrix = t.calculateSpriteMatrix(this.maskMatrix, e).prepend(r.uvMatrix.mapCoord), this.uniforms.alpha = e.worldAlpha, this.uniforms.maskClamp = r.uvMatrix.uClampFrame, t.applyFilter(this, i, n, s)) }, i }(Ct), Bt = function() { function t(t) { this.renderer = t, this.enableScissor = !0, this.alphaMaskPool = [], this.maskDataPool = [], this.maskStack = [], this.alphaMaskIndex = 0 } return t.prototype.setMaskStack = function(t) { this.maskStack = t, this.renderer.scissor.setMaskStack(t), this.renderer.stencil.setMaskStack(t) }, t.prototype.push = function(t, i) { var n = i; if (!n.isMaskData) { var s = this.maskDataPool.pop() || new ut; s.pooled = !0, s.maskObject = i, n = s } if (n.copyCountersOrReset(0 !== this.maskStack.length ? this.maskStack[this.maskStack.length - 1] : null), n.autoDetect && this.detect(n), n.Vt = t, n.type !== e.A7.SPRITE && this.maskStack.push(n), n.enabled) switch (n.type) { case e.A7.SCISSOR: this.renderer.scissor.push(n); break; case e.A7.STENCIL: this.renderer.stencil.push(n); break; case e.A7.SPRITE: n.copyCountersOrReset(null), this.pushSpriteMask(n) } n.type === e.A7.SPRITE && this.maskStack.push(n) }, t.prototype.pop = function(t) { var i = this.maskStack.pop(); if (i && i.Vt === t) { if (i.enabled) switch (i.type) { case e.A7.SCISSOR: this.renderer.scissor.pop(); break; case e.A7.STENCIL: this.renderer.stencil.pop(i.maskObject); break; case e.A7.SPRITE: this.popSpriteMask(i) } if (i.reset(), i.pooled && this.maskDataPool.push(i), 0 !== this.maskStack.length) { var n = this.maskStack[this.maskStack.length - 1]; n.type === e.A7.SPRITE && n.jt && (n.jt[0].maskSprite = n.maskObject) } } }, t.prototype.detect = function(t) { t.type = t.maskObject.isSprite ? e.A7.SPRITE : this.enableScissor && this.renderer.scissor.testScissor(t) ? e.A7.SCISSOR : e.A7.STENCIL }, t.prototype.pushSpriteMask = function(t) { var i, n, s = t.maskObject, e = t.Vt, r = t.jt; r || (r = this.alphaMaskPool[this.alphaMaskIndex]) || (r = this.alphaMaskPool[this.alphaMaskIndex] = [new Ft]); var h, o, u = this.renderer, a = u.renderTexture; if (a.current) { var l = a.current; h = t.resolution || l.resolution, o = null !== (i = t.multisample) && void 0 !== i ? i : l.multisample } else h = t.resolution || u.resolution, o = null !== (n = t.multisample) && void 0 !== n ? n : u.multisample; r[0].resolution = h, r[0].multisample = o, r[0].maskSprite = s; var c = e.filterArea; e.filterArea = s.getBounds(!0), u.filter.push(e, r), e.filterArea = c, t.jt || this.alphaMaskIndex++ }, t.prototype.popSpriteMask = function(t) { this.renderer.filter.pop(), t.jt ? t.jt[0].maskSprite = null : (this.alphaMaskIndex--, this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite = null) }, t.prototype.destroy = function() { this.renderer = null }, t }(), Dt = function() { function t(t) { this.renderer = t, this.maskStack = [], this.glConst = 0 } return t.prototype.getStackLength = function() { return this.maskStack.length }, t.prototype.setMaskStack = function(t) { var i = this.renderer.gl, n = this.getStackLength(); this.maskStack = t; var s = this.getStackLength(); s !== n && (0 === s ? i.disable(this.glConst) : (i.enable(this.glConst), this.Zt())) }, t.prototype.Zt = function() {}, t.prototype.destroy = function() { this.renderer = null, this.maskStack = null }, t }(), jt = new u.y3, Gt = function(t) { function i(i) { var n = t.call(this, i) || this; return n.glConst = WebGLRenderingContext.SCISSOR_TEST, n } return f(i, t), i.prototype.getStackLength = function() { var t = this.maskStack[this.maskStack.length - 1]; return t ? t.Wt : 0 }, i.prototype.calcScissorRect = function(t) { if (!t.Xt) { var i = t.Ht, n = t.maskObject, s = this.renderer, e = s.renderTexture; n.renderable = !0; var r = n.getBounds(); this.roundFrameToPixels(r, e.current ? e.current.resolution : s.resolution, e.sourceFrame, e.destinationFrame, s.projection.transform), n.renderable = !1, i && r.fit(i), t.Xt = r } }, i.isMatrixRotated = function(t) { if (!t) return !1; var i = t.a, n = t.c, s = t.d; return (Math.abs(t.b) > 1e-4 || Math.abs(n) > 1e-4) && (Math.abs(i) > 1e-4 || Math.abs(s) > 1e-4) }, i.prototype.testScissor = function(t) { var n = t.maskObject; if (!n.isFastRect || !n.isFastRect()) return !1; if (i.isMatrixRotated(n.worldTransform)) return !1; if (i.isMatrixRotated(this.renderer.projection.transform)) return !1; this.calcScissorRect(t); var s = t.Xt; return s.width > 0 && s.height > 0 }, i.prototype.roundFrameToPixels = function(t, n, s, e, r) { i.isMatrixRotated(r) || ((r = r ? jt.copyFrom(r) : jt.identity()).translate(-s.x, -s.y).scale(e.width / s.width, e.height / s.height).translate(e.x, e.y), this.renderer.filter.transformAABB(r, t), t.fit(e), t.x = Math.round(t.x * n), t.y = Math.round(t.y * n), t.width = Math.round(t.width * n), t.height = Math.round(t.height * n)) }, i.prototype.push = function(t) { t.Xt || this.calcScissorRect(t); var i = this.renderer.gl; t.Ht || i.enable(i.SCISSOR_TEST), t.Wt++, t.Ht = t.Xt, this.Zt() }, i.prototype.pop = function() { var t = this.renderer.gl; this.getStackLength() > 0 ? this.Zt() : t.disable(t.SCISSOR_TEST) }, i.prototype.Zt = function() { var t = this.maskStack[this.maskStack.length - 1].Ht; this.renderer.gl.scissor(t.x, this.renderer.renderTexture.current ? t.y : this.renderer.height - t.height - t.y, t.width, t.height) }, i }(Dt), Wt = function(t) { function i(i) { var n = t.call(this, i) || this; return n.glConst = WebGLRenderingContext.STENCIL_TEST, n } return f(i, t), i.prototype.getStackLength = function() { var t = this.maskStack[this.maskStack.length - 1]; return t ? t.Gt : 0 }, i.prototype.push = function(t) { var i = t.maskObject, n = this.renderer.gl, s = t.Gt; 0 === s && (this.renderer.framebuffer.forceStencil(), n.clearStencil(0), n.clear(n.STENCIL_BUFFER_BIT), n.enable(n.STENCIL_TEST)), t.Gt++, n.colorMask(!1, !1, !1, !1), n.stencilFunc(n.EQUAL, s, 4294967295), n.stencilOp(n.KEEP, n.KEEP, n.INCR), i.renderable = !0, i.render(this.renderer), this.renderer.batch.flush(), i.renderable = !1, this.Zt() }, i.prototype.pop = function(t) { var i = this.renderer.gl; 0 === this.getStackLength() ? i.disable(i.STENCIL_TEST) : (i.colorMask(!1, !1, !1, !1), i.stencilOp(i.KEEP, i.KEEP, i.DECR), t.renderable = !0, t.render(this.renderer), this.renderer.batch.flush(), t.renderable = !1, this.Zt()) }, i.prototype.Zt = function() { var t = this.renderer.gl; t.colorMask(!0, !0, !0, !0), t.stencilFunc(t.EQUAL, this.getStackLength(), 4294967295), t.stencilOp(t.KEEP, t.KEEP, t.KEEP) }, i }(Dt), Ht = function() { function t(t) { this.renderer = t, this.destinationFrame = null, this.sourceFrame = null, this.defaultFrame = null, this.projectionMatrix = new u.y3, this.transform = null } return t.prototype.update = function(t, i, n, s) { this.destinationFrame = t || this.destinationFrame || this.defaultFrame, this.sourceFrame = i || this.sourceFrame || t, this.calculateProjection(this.destinationFrame, this.sourceFrame, n, s), this.transform && this.projectionMatrix.append(this.transform); var e = this.renderer; e.globalUniforms.uniforms.projectionMatrix = this.projectionMatrix, e.globalUniforms.update(), e.shader.shader && e.shader.syncUniformGroup(e.shader.shader.uniforms.globals) }, t.prototype.calculateProjection = function(t, i, n, s) { var e = this.projectionMatrix, r = s ? -1 : 1; e.identity(), e.a = 1 / i.width * 2, e.d = r * (1 / i.height * 2), e.tx = -1 - i.x * e.a, e.ty = -r - i.y * e.d }, t.prototype.setTransform = function(t) {}, t.prototype.destroy = function() { this.renderer = null }, t }(), Xt = new u.Ae, Vt = new u.Ae, $t = function() { function t(t) { this.renderer = t, this.clearColor = t.Jt, this.defaultMaskStack = [], this.current = null, this.sourceFrame = new u.Ae, this.destinationFrame = new u.Ae, this.viewportFrame = new u.Ae } return t.prototype.bind = function(t, i, n) { void 0 === t && (t = null); var s, e, r, h = this.renderer; this.current = t, t ? (r = (s = t.baseTexture).resolution, i || (Xt.width = t.frame.width, Xt.height = t.frame.height, i = Xt), n || (Vt.x = t.frame.x, Vt.y = t.frame.y, Vt.width = i.width, Vt.height = i.height, n = Vt), e = s.framebuffer) : (r = h.resolution, i || (Xt.width = h.screen.width, Xt.height = h.screen.height, i = Xt), n || ((n = Xt).width = i.width, n.height = i.height)); var o = this.viewportFrame; o.x = n.x * r, o.y = n.y * r, o.width = n.width * r, o.height = n.height * r, t || (o.y = h.view.height - (o.y + o.height)), o.ceil(), this.renderer.framebuffer.bind(e, o), this.renderer.projection.update(n, i, r, !e), this.renderer.mask.setMaskStack(t ? s.maskStack : this.defaultMaskStack), this.sourceFrame.copyFrom(i), this.destinationFrame.copyFrom(n) }, t.prototype.clear = function(t, i) { t = this.current ? t || this.current.baseTexture.clearColor : t || this.clearColor; var n = this.destinationFrame, s = this.current ? this.current.baseTexture : this.renderer.screen, e = n.width !== s.width || n.height !== s.height; if (e) { var r = this.viewportFrame, h = r.x, o = r.y, u = r.width, a = r.height; h = Math.round(h), o = Math.round(o), u = Math.round(u), a = Math.round(a), this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST), this.renderer.gl.scissor(h, o, u, a) } this.renderer.framebuffer.clear(t[0], t[1], t[2], t[3], i), e && this.renderer.scissor.pop() }, t.prototype.resize = function() { this.bind(null) }, t.prototype.reset = function() { this.bind(null) }, t.prototype.destroy = function() { this.renderer = null }, t }(); function Yt(t, i, n, s, e) { n.buffer.update(e) } var zt = { float: "\n data[offset] = v;\n ", vec2: "\n data[offset] = v[0];\n data[offset+1] = v[1];\n ", vec3: "\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n\n ", vec4: "\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n data[offset+3] = v[3];\n ", mat2: "\n data[offset] = v[0];\n data[offset+1] = v[1];\n\n data[offset+4] = v[2];\n data[offset+5] = v[3];\n ", mat3: "\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n\n data[offset + 4] = v[3];\n data[offset + 5] = v[4];\n data[offset + 6] = v[5];\n\n data[offset + 8] = v[6];\n data[offset + 9] = v[7];\n data[offset + 10] = v[8];\n ", mat4: "\n for(var i = 0; i < 16; i++)\n {\n data[offset + i] = v[i];\n }\n " }, Kt = { float: 4, vec2: 8, vec3: 12, vec4: 16, int: 4, ivec2: 8, ivec3: 12, ivec4: 16, uint: 4, uvec2: 8, uvec3: 12, uvec4: 16, bool: 4, bvec2: 8, bvec3: 12, bvec4: 16, mat2: 32, mat3: 48, mat4: 64 }; function qt(t, i) { if (!t.autoManage) return { size: 0, syncFunc: Yt }; for (var n = function(t, i) { var n = []; for (var s in t) i[s] && n.push(i[s]); return n.sort((function(t, i) { return t.index - i.index })), n }(t.uniforms, i), s = function(t) { for (var i = t.map((function(t) { return { data: t, offset: 0, dataLen: 0, dirty: 0 } })), n = 0, s = 0, e = 0, r = 0; r < i.length; r++) { var h = i[r]; if (n = Kt[h.data.type], h.data.size > 1 && (n = Math.max(n, 16) * h.data.size), h.dataLen = n, s % n != 0 && s < 16) { var o = s % n % 16; s += o, e += o } s + n > 16 ? (e = 16 * Math.ceil(e / 16), h.offset = e, e += n, s = n) : (h.offset = e, s += n, e += n) } return { uboElements: i, size: e = 16 * Math.ceil(e / 16) } }(n), e = s.uboElements, r = s.size, h = ["\n var v = null;\n var v2 = null;\n var cv = null;\n var t = 0;\n var gl = renderer.gl\n var index = 0;\n var data = buffer.data;\n "], o = 0; o < e.length; o++) { for (var u = e[o], a = t.uniforms[u.data.name], l = u.data.name, c = !1, f = 0; f < St.length; f++) { var v = St[f]; if (v.codeUbo && v.test(u.data, a)) { h.push("offset = " + u.offset / 4 + ";", St[f].codeUbo(u.data.name, a)), c = !0; break } } if (!c) if (u.data.size > 1) { var d = wt(u.data.type), _ = Math.max(Kt[u.data.type] / 16, 1), p = d / _; h.push("\n cv = ud." + l + ".value;\n v = uv." + l + ";\n offset = " + u.offset / 4 + ";\n\n t = 0;\n\n for(var i=0; i < " + u.data.size * _ + "; i++)\n {\n for(var j = 0; j < " + p + "; j++)\n {\n data[offset++] = v[t++];\n }\n offset += " + (4 - p % 4) % 4 + ";\n }\n\n ") } else { h.push("\n cv = ud." + l + ".value;\n v = uv." + l + ";\n offset = " + u.offset / 4 + ";\n " + zt[u.data.type] + ";\n ") } } return h.push("\n renderer.buffer.update(buffer);\n "), { size: r, syncFunc: new Function("ud", "uv", "renderer", "syncData", "buffer", h.join("\n")) } } var Zt = function() { function t(t, i) { this.program = t, this.uniformData = i, this.uniformGroups = {}, this.uniformDirtyGroups = {}, this.uniformBufferBindings = {} } return t.prototype.destroy = function() { this.uniformData = null, this.uniformGroups = null, this.uniformDirtyGroups = null, this.uniformBufferBindings = null, this.program = null }, t }(); function Jt(t, i) { var n = at(t, t.VERTEX_SHADER, i.vertexSrc), s = at(t, t.FRAGMENT_SHADER, i.fragmentSrc), e = t.createProgram(); if (t.attachShader(e, n), t.attachShader(e, s), t.linkProgram(e), t.getProgramParameter(e, t.LINK_STATUS) || function(t, i, n, s) { t.getProgramParameter(i, t.LINK_STATUS) || (t.getShaderParameter(n, t.COMPILE_STATUS) || lt(t, n), t.getShaderParameter(s, t.COMPILE_STATUS) || lt(t, s), "" !== t.getProgramInfoLog(i) && t.getProgramInfoLog(i)) }(t, e, n, s), i.attributeData = function(t, i) { for (var n = {}, s = i.getProgramParameter(t, i.ACTIVE_ATTRIBUTES), e = 0; e < s; e++) { var r = i.getActiveAttrib(t, e); if (0 !== r.name.indexOf("gl_")) { var h = Et(i, r.type), o = { type: h, name: r.name, size: wt(h), location: i.getAttribLocation(t, r.name) }; n[r.name] = o } } return n }(e, t), i.uniformData = function(t, i) { for (var n = {}, s = i.getProgramParameter(t, i.ACTIVE_UNIFORMS), e = 0; e < s; e++) { var r = i.getActiveUniform(t, e), h = r.name.replace(/\[.*?\]$/, ""), o = !!r.name.match(/\[.*?\]$/), u = Et(i, r.type); n[h] = { name: h, index: e, type: u, size: r.size, isArray: o, value: ft(u, r.size) } } return n }(e, t), !/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(i.vertexSrc)) { var r = Object.keys(i.attributeData); r.sort((function(t, i) { return t > i ? 1 : -1 })); for (var h = 0; h < r.length; h++) i.attributeData[r[h]].location = h, t.bindAttribLocation(e, h, r[h]); t.linkProgram(e) } t.deleteShader(n), t.deleteShader(s); var o = {}; for (var h in i.uniformData) { var u = i.uniformData[h]; o[h] = { location: t.getUniformLocation(e, h), value: ft(u.type, u.size) } } return new Zt(e, o) } var Qt = 0, ti = { textureCount: 0, uboCount: 0 }, ii = function() { function t(t) { this.destroyed = !1, this.renderer = t, this.systemCheck(), this.gl = null, this.shader = null, this.program = null, this.cache = {}, this.Qt = {}, this.id = Qt++ } return t.prototype.systemCheck = function() { if (! function() { if ("boolean" == typeof Mt) return Mt; try { var t = new Function("param1", "param2", "param3", "return param1[param2] === param3;"); Mt = !0 === t({ a: "b" }, "a", "b") } catch (t) { Mt = !1 } return Mt }()) throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.") }, t.prototype.contextChange = function(t) { this.gl = t, this.reset() }, t.prototype.bind = function(t, i) { t.uniforms.globals = this.renderer.globalUniforms; var n = t.program, s = n.glPrograms[this.renderer.CONTEXT_UID] || this.generateProgram(t); return this.shader = t, this.program !== n && (this.program = n, this.gl.useProgram(s.program)), i || (ti.textureCount = 0, ti.uboCount = 0, this.syncUniformGroup(t.uniformGroup, ti)), s }, t.prototype.setUniforms = function(t) { var i = this.shader.program; i.syncUniforms(i.glPrograms[this.renderer.CONTEXT_UID].uniformData, t, this.renderer) }, t.prototype.syncUniformGroup = function(t, i) { var n = this.getGlProgram(); t.static && t.dirtyId === n.uniformDirtyGroups[t.id] || (n.uniformDirtyGroups[t.id] = t.dirtyId, this.syncUniforms(t, n, i)) }, t.prototype.syncUniforms = function(t, i, n) { (t.syncUniforms[this.shader.program.id] || this.createSyncGroups(t))(i.uniformData, t.uniforms, this.renderer, n) }, t.prototype.createSyncGroups = function(t) { var i = this.getSignature(t, this.shader.program.uniformData, "u"); return this.cache[i] || (this.cache[i] = function(t, i) { var n, s = ["\n var v = null;\n var cv = null;\n var cu = null;\n var t = 0;\n var gl = renderer.gl;\n "]; for (var e in t.uniforms) { var r = i[e]; if (r) { for (var h = t.uniforms[e], o = !1, u = 0; u < St.length; u++) if (St[u].test(r, h)) { s.push(St[u].code(e, h)), o = !0; break } if (!o) { var a = (1 === r.size ? At : Tt)[r.type].replace("location", 'ud["' + e + '"].location'); s.push('\n cu = ud["' + e + '"];\n cv = cu.value;\n v = uv["' + e + '"];\n ' + a + ";") } } else(null === (n = t.uniforms[e]) || void 0 === n ? void 0 : n.group) && s.push(t.uniforms[e].ubo ? "\n renderer.shader.syncUniformBufferGroup(uv." + e + ", '" + e + "');\n " : "\n renderer.shader.syncUniformGroup(uv." + e + ", syncData);\n ") } return new Function("ud", "uv", "renderer", "syncData", s.join("\n")) }(t, this.shader.program.uniformData)), t.syncUniforms[this.shader.program.id] = this.cache[i], t.syncUniforms[this.shader.program.id] }, t.prototype.syncUniformBufferGroup = function(t, i) { var n = this.getGlProgram(); if (!t.static || 0 !== t.dirtyId || !n.uniformGroups[t.id]) { t.dirtyId = 0; var s = n.uniformGroups[t.id] || this.createSyncBufferGroup(t, n, i); t.buffer.update(), s(n.uniformData, t.uniforms, this.renderer, ti, t.buffer) } this.renderer.buffer.bindBufferBase(t.buffer, n.uniformBufferBindings[i]) }, t.prototype.createSyncBufferGroup = function(t, i, n) { var s = this.renderer.gl; this.renderer.buffer.bind(t.buffer); var e = this.gl.getUniformBlockIndex(i.program, n); i.uniformBufferBindings[n] = this.shader.uniformBindCount, s.uniformBlockBinding(i.program, e, this.shader.uniformBindCount), this.shader.uniformBindCount++; var r = this.getSignature(t, this.shader.program.uniformData, "ubo"), h = this.Qt[r]; if (h || (h = this.Qt[r] = qt(t, this.shader.program.uniformData)), t.autoManage) { var o = new Float32Array(h.size / 4); t.buffer.update(o) } return i.uniformGroups[t.id] = h.syncFunc, i.uniformGroups[t.id] }, t.prototype.getSignature = function(t, i, n) { var s = t.uniforms, e = [n + "-"]; for (var r in s) e.push(r), i[r] && e.push(i[r].type); return e.join("-") }, t.prototype.getGlProgram = function() { return this.shader ? this.shader.program.glPrograms[this.renderer.CONTEXT_UID] : null }, t.prototype.generateProgram = function(t) { var i = t.program, n = Jt(this.gl, i); return i.glPrograms[this.renderer.CONTEXT_UID] = n, n }, t.prototype.reset = function() { this.program = null, this.shader = null }, t.prototype.destroy = function() { this.renderer = null, this.destroyed = !0 }, t }(); var ni = function() { function t() { this.gl = null, this.stateId = 0, this.polygonOffset = 0, this.blendMode = e.T$.NONE, this.ti = !1, this.map = [], this.map[0] = this.setBlend, this.map[1] = this.setOffset, this.map[2] = this.setCullFace, this.map[3] = this.setDepthTest, this.map[4] = this.setFrontFace, this.map[5] = this.setDepthMask, this.checks = [], this.defaultState = new Lt, this.defaultState.blend = !0 } return t.prototype.contextChange = function(t) { this.gl = t, this.blendModes = function(t, i) { return void 0 === i && (i = []), i[e.T$.NORMAL] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.ADD] = [t.ONE, t.ONE], i[e.T$.MULTIPLY] = [t.DST_COLOR, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.SCREEN] = [t.ONE, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.OVERLAY] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.DARKEN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.LIGHTEN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.COLOR_DODGE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.COLOR_BURN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.HARD_LIGHT] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.SOFT_LIGHT] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.DIFFERENCE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.EXCLUSION] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.HUE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.SATURATION] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.COLOR] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.LUMINOSITY] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.NONE] = [0, 0], i[e.T$.NORMAL_NPM] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.ADD_NPM] = [t.SRC_ALPHA, t.ONE, t.ONE, t.ONE], i[e.T$.SCREEN_NPM] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA], i[e.T$.SRC_IN] = [t.DST_ALPHA, t.ZERO], i[e.T$.SRC_OUT] = [t.ONE_MINUS_DST_ALPHA, t.ZERO], i[e.T$.SRC_ATOP] = [t.DST_ALPHA, t.ONE_MINUS_SRC_ALPHA], i[e.T$.DST_OVER] = [t.ONE_MINUS_DST_ALPHA, t.ONE], i[e.T$.DST_IN] = [t.ZERO, t.SRC_ALPHA], i[e.T$.DST_OUT] = [t.ZERO, t.ONE_MINUS_SRC_ALPHA], i[e.T$.DST_ATOP] = [t.ONE_MINUS_DST_ALPHA, t.SRC_ALPHA], i[e.T$.XOR] = [t.ONE_MINUS_DST_ALPHA, t.ONE_MINUS_SRC_ALPHA], i[e.T$.SUBTRACT] = [t.ONE, t.ONE, t.ONE, t.ONE, t.FUNC_REVERSE_SUBTRACT, t.FUNC_ADD], i }(t), this.set(this.defaultState), this.reset() }, t.prototype.set = function(t) { if (this.stateId !== (t = t || this.defaultState).data) { for (var i = this.stateId ^ t.data, n = 0; i;) 1 & i && this.map[n].call(this, !!(t.data & 1 << n)), i >>= 1, n++; this.stateId = t.data } for (n = 0; n < this.checks.length; n++) this.checks[n](this, t) }, t.prototype.forceState = function(t) { t = t || this.defaultState; for (var i = 0; i < this.map.length; i++) this.map[i].call(this, !!(t.data & 1 << i)); for (i = 0; i < this.checks.length; i++) this.checks[i](this, t); this.stateId = t.data }, t.prototype.setBlend = function(i) { this.updateCheck(t.checkBlendMode, i), this.gl[i ? "enable" : "disable"](this.gl.BLEND) }, t.prototype.setOffset = function(i) { this.updateCheck(t.checkPolygonOffset, i), this.gl[i ? "enable" : "disable"](this.gl.POLYGON_OFFSET_FILL) }, t.prototype.setDepthTest = function(t) { this.gl[t ? "enable" : "disable"](this.gl.DEPTH_TEST) }, t.prototype.setDepthMask = function(t) { this.gl.depthMask(t) }, t.prototype.setCullFace = function(t) { this.gl[t ? "enable" : "disable"](this.gl.CULL_FACE) }, t.prototype.setFrontFace = function(t) { this.gl.frontFace(this.gl[t ? "CW" : "CCW"]) }, t.prototype.setBlendMode = function(t) { if (t !== this.blendMode) { this.blendMode = t; var i = this.blendModes[t], n = this.gl; 2 === i.length ? n.blendFunc(i[0], i[1]) : n.blendFuncSeparate(i[0], i[1], i[2], i[3]), 6 === i.length ? (this.ti = !0, n.blendEquationSeparate(i[4], i[5])) : this.ti && (this.ti = !1, n.blendEquationSeparate(n.FUNC_ADD, n.FUNC_ADD)) } }, t.prototype.setPolygonOffset = function(t, i) { this.gl.polygonOffset(t, i) }, t.prototype.reset = function() { this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, !1), this.forceState(this.defaultState), this.ti = !0, this.blendMode = -1, this.setBlendMode(0) }, t.prototype.updateCheck = function(t, i) { var n = this.checks.indexOf(t); i && -1 === n ? this.checks.push(t) : i || -1 === n || this.checks.splice(n, 1) }, t.checkBlendMode = function(t, i) { t.setBlendMode(i.blendMode) }, t.checkPolygonOffset = function(t, i) { t.setPolygonOffset(1, i.polygonOffset) }, t.prototype.destroy = function() { this.gl = null }, t }(), si = function() { function t(t) { this.renderer = t, this.count = 0, this.checkCount = 0, this.maxIdle = s.X.GC_MAX_IDLE, this.checkCountMax = s.X.GC_MAX_CHECK_COUNT, this.mode = s.X.GC_MODE } return t.prototype.postrender = function() { this.renderer.renderingToScreen && (this.count++, this.mode !== e.UN.MANUAL && (this.checkCount++, this.checkCount > this.checkCountMax && (this.checkCount = 0, this.run()))) }, t.prototype.run = function() { for (var t = this.renderer.texture, i = t.managedTextures, n = !1, s = 0; s < i.length; s++) { var e = i[s]; !e.framebuffer && this.count - e.touched > this.maxIdle && (t.destroyTexture(e, !0), i[s] = null, n = !0) } if (n) { var r = 0; for (s = 0; s < i.length; s++) null !== i[s] && (i[r++] = i[s]); i.length = r } }, t.prototype.unload = function(t) { var i = t.Ft; i && !i.framebuffer && this.renderer.texture.destroyTexture(i); for (var n = t.children.length - 1; n >= 0; n--) this.unload(t.children[n]) }, t.prototype.destroy = function() { this.renderer = null }, t }(); var ei = function(t) { this.texture = t, this.width = -1, this.height = -1, this.dirtyId = -1, this.dirtyStyleId = -1, this.mipmap = !1, this.wrapMode = 33071, this.type = e.vK.UNSIGNED_BYTE, this.internalFormat = e.I2.RGBA, this.samplerType = 0 }, ri = function() { function t(t) { this.renderer = t, this.boundTextures = [], this.currentLocation = -1, this.managedTextures = [], this.ii = !1, this.unknownTexture = new m, this.hasIntegerTextures = !1 } return t.prototype.contextChange = function() { var t = this.gl = this.renderer.gl; this.CONTEXT_UID = this.renderer.CONTEXT_UID, this.webGLVersion = this.renderer.context.webGLVersion, this.internalFormats = function(t) { var i, n, s, r, h, o, u, a, l, c, f, v, d, _, p, m, b, w, g, y, E, S, A; return "WebGL2RenderingContext" in globalThis && t instanceof globalThis.WebGL2RenderingContext ? ((i = {})[e.vK.UNSIGNED_BYTE] = ((n = {})[e.I2.RGBA] = t.RGBA8, n[e.I2.RGB] = t.RGB8, n[e.I2.RG] = t.RG8, n[e.I2.RED] = t.R8, n[e.I2.RGBA_INTEGER] = t.RGBA8UI, n[e.I2.RGB_INTEGER] = t.RGB8UI, n[e.I2.RG_INTEGER] = t.RG8UI, n[e.I2.RED_INTEGER] = t.R8UI, n[e.I2.ALPHA] = t.ALPHA, n[e.I2.LUMINANCE] = t.LUMINANCE, n[e.I2.LUMINANCE_ALPHA] = t.LUMINANCE_ALPHA, n), i[e.vK.BYTE] = ((s = {})[e.I2.RGBA] = t.RGBA8_SNORM, s[e.I2.RGB] = t.RGB8_SNORM, s[e.I2.RG] = t.RG8_SNORM, s[e.I2.RED] = t.R8_SNORM, s[e.I2.RGBA_INTEGER] = t.RGBA8I, s[e.I2.RGB_INTEGER] = t.RGB8I, s[e.I2.RG_INTEGER] = t.RG8I, s[e.I2.RED_INTEGER] = t.R8I, s), i[e.vK.UNSIGNED_SHORT] = ((r = {})[e.I2.RGBA_INTEGER] = t.RGBA16UI, r[e.I2.RGB_INTEGER] = t.RGB16UI, r[e.I2.RG_INTEGER] = t.RG16UI, r[e.I2.RED_INTEGER] = t.R16UI, r[e.I2.DEPTH_COMPONENT] = t.DEPTH_COMPONENT16, r), i[e.vK.SHORT] = ((h = {})[e.I2.RGBA_INTEGER] = t.RGBA16I, h[e.I2.RGB_INTEGER] = t.RGB16I, h[e.I2.RG_INTEGER] = t.RG16I, h[e.I2.RED_INTEGER] = t.R16I, h), i[e.vK.UNSIGNED_INT] = ((o = {})[e.I2.RGBA_INTEGER] = t.RGBA32UI, o[e.I2.RGB_INTEGER] = t.RGB32UI, o[e.I2.RG_INTEGER] = t.RG32UI, o[e.I2.RED_INTEGER] = t.R32UI, o[e.I2.DEPTH_COMPONENT] = t.DEPTH_COMPONENT24, o), i[e.vK.INT] = ((u = {})[e.I2.RGBA_INTEGER] = t.RGBA32I, u[e.I2.RGB_INTEGER] = t.RGB32I, u[e.I2.RG_INTEGER] = t.RG32I, u[e.I2.RED_INTEGER] = t.R32I, u), i[e.vK.FLOAT] = ((a = {})[e.I2.RGBA] = t.RGBA32F, a[e.I2.RGB] = t.RGB32F, a[e.I2.RG] = t.RG32F, a[e.I2.RED] = t.R32F, a[e.I2.DEPTH_COMPONENT] = t.DEPTH_COMPONENT32F, a), i[e.vK.HALF_FLOAT] = ((l = {})[e.I2.RGBA] = t.RGBA16F, l[e.I2.RGB] = t.RGB16F, l[e.I2.RG] = t.RG16F, l[e.I2.RED] = t.R16F, l), i[e.vK.UNSIGNED_SHORT_5_6_5] = ((c = {})[e.I2.RGB] = t.RGB565, c), i[e.vK.UNSIGNED_SHORT_4_4_4_4] = ((f = {})[e.I2.RGBA] = t.RGBA4, f), i[e.vK.UNSIGNED_SHORT_5_5_5_1] = ((v = {})[e.I2.RGBA] = t.RGB5_A1, v), i[e.vK.UNSIGNED_INT_2_10_10_10_REV] = ((d = {})[e.I2.RGBA] = t.RGB10_A2, d[e.I2.RGBA_INTEGER] = t.RGB10_A2UI, d), i[e.vK.UNSIGNED_INT_10F_11F_11F_REV] = ((_ = {})[e.I2.RGB] = t.R11F_G11F_B10F, _), i[e.vK.UNSIGNED_INT_5_9_9_9_REV] = ((p = {})[e.I2.RGB] = t.RGB9_E5, p), i[e.vK.UNSIGNED_INT_24_8] = ((m = {})[e.I2.DEPTH_STENCIL] = t.DEPTH24_STENCIL8, m), i[e.vK.FLOAT_32_UNSIGNED_INT_24_8_REV] = ((b = {})[e.I2.DEPTH_STENCIL] = t.DEPTH32F_STENCIL8, b), A = i) : ((w = {})[e.vK.UNSIGNED_BYTE] = ((g = {})[e.I2.RGBA] = t.RGBA, g[e.I2.RGB] = t.RGB, g[e.I2.ALPHA] = t.ALPHA, g[e.I2.LUMINANCE] = t.LUMINANCE, g[e.I2.LUMINANCE_ALPHA] = t.LUMINANCE_ALPHA, g), w[e.vK.UNSIGNED_SHORT_5_6_5] = ((y = {})[e.I2.RGB] = t.RGB, y), w[e.vK.UNSIGNED_SHORT_4_4_4_4] = ((E = {})[e.I2.RGBA] = t.RGBA, E), w[e.vK.UNSIGNED_SHORT_5_5_5_1] = ((S = {})[e.I2.RGBA] = t.RGBA, S), A = w), A }(t); var i = t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS); this.boundTextures.length = i; for (var n = 0; n < i; n++) this.boundTextures[n] = null; this.emptyTextures = {}; var s = new ei(t.createTexture()); t.bindTexture(t.TEXTURE_2D, s.texture), t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, 1, 1, 0, t.RGBA, t.UNSIGNED_BYTE, new Uint8Array(4)), this.emptyTextures[t.TEXTURE_2D] = s, this.emptyTextures[t.TEXTURE_CUBE_MAP] = new ei(t.createTexture()), t.bindTexture(t.TEXTURE_CUBE_MAP, this.emptyTextures[t.TEXTURE_CUBE_MAP].texture); for (n = 0; n < 6; n++) t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X + n, 0, t.RGBA, 1, 1, 0, t.RGBA, t.UNSIGNED_BYTE, null); t.texParameteri(t.TEXTURE_CUBE_MAP, t.TEXTURE_MAG_FILTER, t.LINEAR), t.texParameteri(t.TEXTURE_CUBE_MAP, t.TEXTURE_MIN_FILTER, t.LINEAR); for (n = 0; n < this.boundTextures.length; n++) this.bind(null, n) }, t.prototype.bind = function(t, i) { void 0 === i && (i = 0); var n = this.gl; if ((t = null == t ? void 0 : t.castToBaseTexture()) && t.valid && !t.parentTextureArray) { t.touched = this.renderer.textureGC.count; var s = t.et[this.CONTEXT_UID] || this.initTexture(t); this.boundTextures[i] !== t && (this.currentLocation !== i && (this.currentLocation = i, n.activeTexture(n.TEXTURE0 + i)), n.bindTexture(t.target, s.texture)), s.dirtyId !== t.dirtyId && (this.currentLocation !== i && (this.currentLocation = i, n.activeTexture(n.TEXTURE0 + i)), this.updateTexture(t)), this.boundTextures[i] = t } else this.currentLocation !== i && (this.currentLocation = i, n.activeTexture(n.TEXTURE0 + i)), n.bindTexture(n.TEXTURE_2D, this.emptyTextures[n.TEXTURE_2D].texture), this.boundTextures[i] = null }, t.prototype.reset = function() { this.ii = !0, this.hasIntegerTextures = !1, this.currentLocation = -1; for (var t = 0; t < this.boundTextures.length; t++) this.boundTextures[t] = this.unknownTexture }, t.prototype.unbind = function(t) { var i = this.gl, n = this.boundTextures; if (this.ii) { this.ii = !1; for (var s = 0; s < n.length; s++) n[s] === this.unknownTexture && this.bind(null, s) } for (s = 0; s < n.length; s++) n[s] === t && (this.currentLocation !== s && (i.activeTexture(i.TEXTURE0 + s), this.currentLocation = s), i.bindTexture(t.target, this.emptyTextures[t.target].texture), n[s] = null) }, t.prototype.ensureSamplerType = function(t) { var i = this, n = i.boundTextures, s = i.CONTEXT_UID; if (i.hasIntegerTextures) for (var r = t - 1; r >= 0; --r) { var h = n[r]; if (h) h.et[s].samplerType !== e.oT.FLOAT && this.renderer.texture.unbind(h) } }, t.prototype.initTexture = function(t) { var i = new ei(this.gl.createTexture()); return i.dirtyId = -1, t.et[this.CONTEXT_UID] = i, this.managedTextures.push(t), t.on("dispose", this.destroyTexture, this), i }, t.prototype.initTextureType = function(t, i) { var n, s; i.internalFormat = null !== (s = null === (n = this.internalFormats[t.type]) || void 0 === n ? void 0 : n[t.format]) && void 0 !== s ? s : t.format, i.type = 2 === this.webGLVersion && t.type === e.vK.HALF_FLOAT ? this.gl.HALF_FLOAT : t.type }, t.prototype.updateTexture = function(t) { var i = t.et[this.CONTEXT_UID]; if (i) { var n = this.renderer; if (this.initTextureType(t, i), t.resource && t.resource.upload(n, t, i)) i.samplerType !== e.oT.FLOAT && (this.hasIntegerTextures = !0); else { var s = t.realWidth, r = t.realHeight, h = n.gl; (i.width !== s || i.height !== r || i.dirtyId < 0) && (i.width = s, i.height = r, h.texImage2D(t.target, 0, i.internalFormat, s, r, 0, t.format, i.type, null)) } t.dirtyStyleId !== i.dirtyStyleId && this.updateTextureStyle(t), i.dirtyId = t.dirtyId } }, t.prototype.destroyTexture = function(t, i) { var n = this.gl; if ((t = t.castToBaseTexture()).et[this.CONTEXT_UID] && (this.unbind(t), n.deleteTexture(t.et[this.CONTEXT_UID].texture), t.off("dispose", this.destroyTexture, this), delete t.et[this.CONTEXT_UID], !i)) { var s = this.managedTextures.indexOf(t); - 1 !== s && (0, r.removeItems)(this.managedTextures, s, 1) } }, t.prototype.updateTextureStyle = function(t) { var i = t.et[this.CONTEXT_UID]; i && (i.mipmap = !!(t.mipmap !== e.WB.POW2 && 2 === this.webGLVersion || t.isPowerOfTwo) && t.mipmap >= 1, i.wrapMode = 2 === this.webGLVersion || t.isPowerOfTwo ? t.wrapMode : e.Nt.CLAMP, t.resource && t.resource.style(this.renderer, t, i) || this.setStyle(t, i), i.dirtyStyleId = t.dirtyStyleId) }, t.prototype.setStyle = function(t, i) { var n = this.gl; if (i.mipmap && t.mipmap !== e.WB.ON_MANUAL && n.generateMipmap(t.target), n.texParameteri(t.target, n.TEXTURE_WRAP_S, i.wrapMode), n.texParameteri(t.target, n.TEXTURE_WRAP_T, i.wrapMode), i.mipmap) { n.texParameteri(t.target, n.TEXTURE_MIN_FILTER, t.scaleMode === e.aH.LINEAR ? n.LINEAR_MIPMAP_LINEAR : n.NEAREST_MIPMAP_NEAREST); var s = this.renderer.context.extensions.anisotropicFiltering; if (s && t.anisotropicLevel > 0 && t.scaleMode === e.aH.LINEAR) { var r = Math.min(t.anisotropicLevel, n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT)); n.texParameterf(t.target, s.TEXTURE_MAX_ANISOTROPY_EXT, r) } } else n.texParameteri(t.target, n.TEXTURE_MIN_FILTER, t.scaleMode === e.aH.LINEAR ? n.LINEAR : n.NEAREST); n.texParameteri(t.target, n.TEXTURE_MAG_FILTER, t.scaleMode === e.aH.LINEAR ? n.LINEAR : n.NEAREST) }, t.prototype.destroy = function() { this.renderer = null }, t }(), hi = { __proto__: null, FilterSystem: J, BatchSystem: tt, ContextSystem: nt, FramebufferSystem: rt, GeometrySystem: ot, MaskSystem: Bt, ScissorSystem: Gt, StencilSystem: Wt, ProjectionSystem: Ht, RenderTextureSystem: $t, ShaderSystem: ii, StateSystem: ni, TextureGCSystem: si, TextureSystem: ri }, oi = new u.y3, ui = function(t) { function i(i, n) { void 0 === i && (i = e.N3.UNKNOWN); var h = t.call(this) || this; return n = Object.assign({}, s.X.RENDER_OPTIONS, n), h.options = n, h.type = i, h.screen = new u.Ae(0, 0, n.width, n.height), h.view = n.view || document.createElement("canvas"), h.resolution = n.resolution || s.X.RESOLUTION, h.useContextAlpha = n.useContextAlpha, h.autoDensity = !!n.autoDensity, h.preserveDrawingBuffer = n.preserveDrawingBuffer, h.clearBeforeRender = n.clearBeforeRender, h.ni = 0, h.Jt = [0, 0, 0, 1], h.si = "#000000", h.backgroundColor = n.backgroundColor || h.ni, h.backgroundAlpha = n.backgroundAlpha, void 0 !== n.transparent && ((0, r.deprecation)("6.0.0", "Option transparent is deprecated, please use backgroundAlpha instead."), h.useContextAlpha = n.transparent, h.backgroundAlpha = n.transparent ? 0 : 1), h.ei = null, h.plugins = {}, h } return f(i, t), i.prototype.initPlugins = function(t) { for (var i in t) this.plugins[i] = new t[i](this) }, Object.defineProperty(i.prototype, "width", { get: function() { return this.view.width }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "height", { get: function() { return this.view.height }, enumerable: !1, configurable: !0 }), i.prototype.resize = function(t, i) { this.view.width = Math.round(t * this.resolution), this.view.height = Math.round(i * this.resolution); var n = this.view.width / this.resolution, s = this.view.height / this.resolution; this.screen.width = n, this.screen.height = s, this.autoDensity && (this.view.style.width = n + "px", this.view.style.height = s + "px"), this.emit("resize", n, s) }, i.prototype.generateTexture = function(t, i, n, s) { void 0 === i && (i = {}), "number" == typeof i && ((0, r.deprecation)("6.1.0", "generateTexture options (scaleMode, resolution, region) are now object options."), i = { scaleMode: i, resolution: n, region: s }); var e = i.region, h = function(t, i) { var n = {}; for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && i.indexOf(s) < 0 && (n[s] = t[s]); if (null != t && "function" == typeof Object.getOwnPropertySymbols) { var e = 0; for (s = Object.getOwnPropertySymbols(t); e < s.length; e++) i.indexOf(s[e]) < 0 && (n[s[e]] = t[s[e]]) } return n }(i, ["region"]); 0 === (s = e || t.getLocalBounds(null, !0)).width && (s.width = 1), 0 === s.height && (s.height = 1); var o = U.create(v({ width: s.width, height: s.height }, h)); return oi.tx = -s.x, oi.ty = -s.y, this.render(t, { renderTexture: o, clear: !1, transform: oi, skipUpdateTransform: !!t.parent }), o }, i.prototype.destroy = function(t) { for (var i in this.plugins) this.plugins[i].destroy(), this.plugins[i] = null; t && this.view.parentNode && this.view.parentNode.removeChild(this.view); var n = this; n.plugins = null, n.type = e.N3.UNKNOWN, n.view = null, n.screen = null, n.ri = null, n.options = null, this.Jt = null, this.si = null, this.ei = null }, Object.defineProperty(i.prototype, "backgroundColor", { get: function() { return this.ni }, set: function(t) { this.ni = t, this.si = (0, r.hex2string)(t), (0, r.hex2rgb)(t, this.Jt) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "backgroundAlpha", { get: function() { return this.Jt[3] }, set: function(t) { this.Jt[3] = t }, enumerable: !1, configurable: !0 }), i }(r.EventEmitter), ai = function(t) { this.buffer = t || null, this.updateID = -1, this.byteLength = -1, this.refCount = 0 }, li = function() { function t(t) { this.renderer = t, this.managedBuffers = {}, this.boundBufferBases = {} } return t.prototype.destroy = function() { this.renderer = null }, t.prototype.contextChange = function() { this.disposeAll(!0), this.gl = this.renderer.gl, this.CONTEXT_UID = this.renderer.CONTEXT_UID }, t.prototype.bind = function(t) { var i = this.gl, n = t.kt[this.CONTEXT_UID] || this.createGLBuffer(t); i.bindBuffer(t.type, n.buffer) }, t.prototype.bindBufferBase = function(t, i) { var n = this.gl; if (this.boundBufferBases[i] !== t) { var s = t.kt[this.CONTEXT_UID] || this.createGLBuffer(t); this.boundBufferBases[i] = t, n.bindBufferBase(n.UNIFORM_BUFFER, i, s.buffer) } }, t.prototype.bindBufferRange = function(t, i, n) { var s = this.gl; n = n || 0; var e = t.kt[this.CONTEXT_UID] || this.createGLBuffer(t); s.bindBufferRange(s.UNIFORM_BUFFER, i || 0, e.buffer, 256 * n, 256) }, t.prototype.update = function(t) { var i = this.gl, n = t.kt[this.CONTEXT_UID]; if (t.Pt !== n.updateID) if (n.updateID = t.Pt, i.bindBuffer(t.type, n.buffer), n.byteLength >= t.data.byteLength) i.bufferSubData(t.type, 0, t.data); else { var s = t.static ? i.STATIC_DRAW : i.DYNAMIC_DRAW; n.byteLength = t.data.byteLength, i.bufferData(t.type, t.data, s) } }, t.prototype.dispose = function(t, i) { if (this.managedBuffers[t.id]) { delete this.managedBuffers[t.id]; var n = t.kt[this.CONTEXT_UID], s = this.gl; t.disposeRunner.remove(this), n && (i || s.deleteBuffer(n.buffer), delete t.kt[this.CONTEXT_UID]) } }, t.prototype.disposeAll = function(t) { for (var i = Object.keys(this.managedBuffers), n = 0; n < i.length; n++) this.dispose(this.managedBuffers[i[n]], t) }, t.prototype.createGLBuffer = function(t) { var i = this.CONTEXT_UID; return t.kt[i] = new ai(this.gl.createBuffer()), this.managedBuffers[t.id] = t, t.disposeRunner.add(this), t.kt[i] }, t }(), ci = function(t) { function i(n) { var s = t.call(this, e.N3.WEBGL, n) || this; return n = s.options, s.gl = null, s.CONTEXT_UID = 0, s.runners = { destroy: new h.R("destroy"), contextChange: new h.R("contextChange"), reset: new h.R("reset"), update: new h.R("update"), postrender: new h.R("postrender"), prerender: new h.R("prerender"), resize: new h.R("resize") }, s.runners.contextChange.add(s), s.globalUniforms = new z({ projectionMatrix: new u.y3 }, !0), s.addSystem(Bt, "mask").addSystem(nt, "context").addSystem(ni, "state").addSystem(ii, "shader").addSystem(ri, "texture").addSystem(li, "buffer").addSystem(ot, "geometry").addSystem(rt, "framebuffer").addSystem(Gt, "scissor").addSystem(Wt, "stencil").addSystem(Ht, "projection").addSystem(si, "textureGC").addSystem(J, "filter").addSystem($t, "renderTexture").addSystem(tt, "batch"), s.initPlugins(i.hi), s.multisample = void 0, n.context ? s.context.initFromContext(n.context) : s.context.initFromOptions({ alpha: !!s.useContextAlpha, antialias: n.antialias, premultipliedAlpha: s.useContextAlpha && "notMultiplied" !== s.useContextAlpha, stencil: !0, preserveDrawingBuffer: n.preserveDrawingBuffer, powerPreference: s.options.powerPreference }), s.renderingToScreen = !0, (0, r.sayHello)(2 === s.context.webGLVersion ? "WebGL 2" : "WebGL 1"), s.resize(s.options.width, s.options.height), s } return f(i, t), i.create = function(t) { if ((0, r.isWebGLSupported)()) return new i(t); throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.') }, i.prototype.contextChange = function() { var t, i = this.gl; if (1 === this.context.webGLVersion) { var n = i.getParameter(i.FRAMEBUFFER_BINDING); i.bindFramebuffer(i.FRAMEBUFFER, null), t = i.getParameter(i.SAMPLES), i.bindFramebuffer(i.FRAMEBUFFER, n) } else { n = i.getParameter(i.DRAW_FRAMEBUFFER_BINDING); i.bindFramebuffer(i.DRAW_FRAMEBUFFER, null), t = i.getParameter(i.SAMPLES), i.bindFramebuffer(i.DRAW_FRAMEBUFFER, n) } this.multisample = t >= e.G5.HIGH ? e.G5.HIGH : t >= e.G5.MEDIUM ? e.G5.MEDIUM : t >= e.G5.LOW ? e.G5.LOW : e.G5.NONE }, i.prototype.addSystem = function(t, i) { var n = new t(this); if (this[i]) throw new Error('Whoops! The name "' + i + '" is already in use'); for (var s in this[i] = n, this.runners) this.runners[s].add(n); return this }, i.prototype.render = function(t, i) { var n, s, e, h; if (i && (i instanceof U ? ((0, r.deprecation)("6.0.0", "Renderer#render arguments changed, use options instead."), n = i, s = arguments[2], e = arguments[3], h = arguments[4]) : (n = i.renderTexture, s = i.clear, e = i.transform, h = i.skipUpdateTransform)), this.renderingToScreen = !n, this.runners.prerender.emit(), this.emit("prerender"), this.projection.transform = e, !this.context.isLost) { if (n || (this.ei = t), !h) { var o = t.enableTempParent(); t.updateTransform(), t.disableTempParent(o) } this.renderTexture.bind(n), this.batch.currentRenderer.start(), (void 0 !== s ? s : this.clearBeforeRender) && this.renderTexture.clear(), t.render(this), this.batch.currentRenderer.flush(), n && n.baseTexture.update(), this.runners.postrender.emit(), this.projection.transform = null, this.emit("postrender") } }, i.prototype.generateTexture = function(i, n, s, e) { void 0 === n && (n = {}); var r = t.prototype.generateTexture.call(this, i, n, s, e); return this.framebuffer.blit(), r }, i.prototype.resize = function(i, n) { t.prototype.resize.call(this, i, n), this.runners.resize.emit(this.screen.height, this.screen.width) }, i.prototype.reset = function() { return this.runners.reset.emit(), this }, i.prototype.clear = function() { this.renderTexture.bind(), this.renderTexture.clear() }, i.prototype.destroy = function(i) { for (var n in this.runners.destroy.emit(), this.runners) this.runners[n].destroy(); t.prototype.destroy.call(this, i), this.gl = null }, Object.defineProperty(i.prototype, "extract", { get: function() { return (0, r.deprecation)("6.0.0", "Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."), this.plugins.extract }, enumerable: !1, configurable: !0 }), i.registerPlugin = function(t, n) { (i.hi = i.hi || {})[t] = n }, i }(ui); function fi(t) { return ci.create(t) } var vi = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n", di = (function() { function t(t) { (0, r.deprecation)("6.1.0", "System class is deprecated, implemement ISystem interface instead."), this.renderer = t } t.prototype.destroy = function() { this.renderer = null } }(), function() { this.texArray = null, this.blend = 0, this.type = e.lg.TRIANGLES, this.start = 0, this.size = 0, this.data = null }), _i = function() { function t() { this.elements = [], this.ids = [], this.count = 0 } return t.prototype.clear = function() { for (var t = 0; t < this.count; t++) this.elements[t] = null; this.count = 0 }, t }(), pi = function() { function t(t) { this.rawBinaryData = "number" == typeof t ? new ArrayBuffer(t) : t instanceof Uint8Array ? t.buffer : t, this.uint32View = new Uint32Array(this.rawBinaryData), this.float32View = new Float32Array(this.rawBinaryData) } return Object.defineProperty(t.prototype, "int8View", { get: function() { return this.oi || (this.oi = new Int8Array(this.rawBinaryData)), this.oi }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "uint8View", { get: function() { return this.ui || (this.ui = new Uint8Array(this.rawBinaryData)), this.ui }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "int16View", { get: function() { return this.ai || (this.ai = new Int16Array(this.rawBinaryData)), this.ai }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "uint16View", { get: function() { return this.li || (this.li = new Uint16Array(this.rawBinaryData)), this.li }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "int32View", { get: function() { return this.ci || (this.ci = new Int32Array(this.rawBinaryData)), this.ci }, enumerable: !1, configurable: !0 }), t.prototype.view = function(t) { return this[t + "View"] }, t.prototype.destroy = function() { this.rawBinaryData = null, this.oi = null, this.ui = null, this.ai = null, this.li = null, this.ci = null, this.uint32View = null, this.float32View = null }, t.sizeOf = function(t) { switch (t) { case "int8": case "uint8": return 1; case "int16": case "uint16": return 2; case "int32": case "uint32": case "float32": return 4; default: throw new Error(t + " isn't a valid view type") } }, t }(), mi = function(t) { function i(i) { var n = t.call(this, i) || this; return n.shaderGenerator = null, n.geometryClass = null, n.vertexSize = null, n.state = Lt.for2d(), n.size = 4 * s.X.SPRITE_BATCH_SIZE, n.fi = 0, n.vi = 0, n.di = [], n._i = [], n.pi = 0, n.mi = null, n.bi = [], n.wi = 2, n.gi = 0, n.yi = {}, n.Ei = {}, n.MAX_TEXTURES = 1, n.renderer.on("prerender", n.onPrerender, n), i.runners.contextChange.add(n), n.Si = 0, n.Ai = 0, n.Ti = 0, n.Mi = null, n.Oi = null, n.Ii = [], n } return f(i, t), i.prototype.contextChange = function() { var t = this.renderer.gl; s.X.PREFER_ENV === e.Vi.WEBGL_LEGACY ? this.MAX_TEXTURES = 1 : (this.MAX_TEXTURES = Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS), s.X.SPRITE_MAX_TEXTURES), this.MAX_TEXTURES = function(t, i) { if (0 === t) throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`"); for (var n = i.createShader(i.FRAGMENT_SHADER);;) { var s = Ot.replace(/%forloop%/gi, It(t)); if (i.shaderSource(n, s), i.compileShader(n), i.getShaderParameter(n, i.COMPILE_STATUS)) break; t = t / 2 | 0 } return t }(this.MAX_TEXTURES, t)), this.mi = this.shaderGenerator.generateShader(this.MAX_TEXTURES); for (var i = 0; i < this.wi; i++) this.bi[i] = new this.geometryClass; this.initFlushBuffers() }, i.prototype.initFlushBuffers = function() { for (var t = i.Ni, n = i.Ri, s = this.size / 4, e = Math.floor(s / this.MAX_TEXTURES) + 1; t.length < s;) t.push(new di); for (; n.length < e;) n.push(new _i); for (var r = 0; r < this.MAX_TEXTURES; r++) this.Ii[r] = null }, i.prototype.onPrerender = function() { this.gi = 0 }, i.prototype.render = function(t) { t.Ft.valid && (this.fi + t.vertexData.length / 2 > this.size && this.flush(), this.fi += t.vertexData.length / 2, this.vi += t.indices.length, this._i[this.pi] = t.Ft.baseTexture, this.di[this.pi++] = t) }, i.prototype.buildTexturesAndDrawCalls = function() { var t = this._i, n = this.MAX_TEXTURES, s = i.Ri, e = this.renderer.batch, r = this.Ii, h = this.renderer.textureGC.count, o = ++m.ut, u = 0, a = s[0], l = 0; e.copyBoundTextures(r, n); for (var c = 0; c < this.pi; ++c) { var f = t[c]; t[c] = null, f.rt !== o && (a.count >= n && (e.boundArray(a, r, o, n), this.buildDrawCalls(a, l, c), l = c, a = s[++u], ++o), f.rt = o, f.touched = h, a.elements[a.count++] = f) } a.count > 0 && (e.boundArray(a, r, o, n), this.buildDrawCalls(a, l, this.pi), ++u, ++o); for (c = 0; c < r.length; c++) r[c] = null; m.ut = o }, i.prototype.buildDrawCalls = function(t, n, s) { var e = this, h = e.di, o = e.Mi, u = e.Oi, a = e.vertexSize, l = i.Ni, c = this.Si, f = this.Ai, v = this.Ti, d = l[c]; d.start = this.Ti, d.texArray = t; for (var _ = n; _ < s; ++_) { var p = h[_], m = r.premultiplyBlendMode[p.Ft.baseTexture.alphaMode ? 1 : 0][p.blendMode]; h[_] = null, n < _ && d.blend !== m && (d.size = v - d.start, n = _, (d = l[++c]).texArray = t, d.start = v), this.packInterleavedGeometry(p, o, u, f, v), f += p.vertexData.length / 2 * a, v += p.indices.length, d.blend = m } n < s && (d.size = v - d.start, ++c), this.Si = c, this.Ai = f, this.Ti = v }, i.prototype.bindAndClearTexArray = function(t) { for (var i = this.renderer.texture, n = 0; n < t.count; n++) i.bind(t.elements[n], t.ids[n]), t.elements[n] = null; t.count = 0 }, i.prototype.updateGeometry = function() { var t = this, i = t.bi, n = t.Mi, e = t.Oi; s.X.CAN_UPLOAD_SAME_BUFFER ? (i[this.gi].Pi.update(n.rawBinaryData), i[this.gi].Oi.update(e), this.renderer.geometry.updateBuffers()) : (this.wi <= this.gi && (this.wi++, i[this.gi] = new this.geometryClass), i[this.gi].Pi.update(n.rawBinaryData), i[this.gi].Oi.update(e), this.renderer.geometry.bind(i[this.gi]), this.renderer.geometry.updateBuffers(), this.gi++) }, i.prototype.drawBatches = function() { for (var t = this.Si, n = this.renderer, s = n.gl, e = n.state, r = i.Ni, h = null, o = 0; o < t; o++) { var u = r[o], a = u.texArray, l = u.type, c = u.size, f = u.start, v = u.blend; h !== a && (h = a, this.bindAndClearTexArray(a)), this.state.blendMode = v, e.set(this.state), s.drawElements(l, c, s.UNSIGNED_SHORT, 2 * f) } }, i.prototype.flush = function() { 0 !== this.fi && (this.Mi = this.getAttributeBuffer(this.fi), this.Oi = this.getIndexBuffer(this.vi), this.Ai = 0, this.Ti = 0, this.Si = 0, this.buildTexturesAndDrawCalls(), this.updateGeometry(), this.drawBatches(), this.pi = 0, this.fi = 0, this.vi = 0) }, i.prototype.start = function() { this.renderer.state.set(this.state), this.renderer.texture.ensureSamplerType(this.MAX_TEXTURES), this.renderer.shader.bind(this.mi), s.X.CAN_UPLOAD_SAME_BUFFER && this.renderer.geometry.bind(this.bi[this.gi]) }, i.prototype.stop = function() { this.flush() }, i.prototype.destroy = function() { for (var i = 0; i < this.wi; i++) this.bi[i] && this.bi[i].destroy(); this.renderer.off("prerender", this.onPrerender, this), this.yi = null, this.Ei = null, this.bi = null, this.Mi = null, this.Oi = null, this.mi && (this.mi.destroy(), this.mi = null), t.prototype.destroy.call(this) }, i.prototype.getAttributeBuffer = function(t) { var i = (0, r.nextPow2)(Math.ceil(t / 8)), n = (0, r.log2)(i), s = 8 * i; this.yi.length <= n && (this.Ei.length = n + 1); var e = this.yi[s]; return e || (this.yi[s] = e = new pi(s * this.vertexSize * 4)), e }, i.prototype.getIndexBuffer = function(t) { var i = (0, r.nextPow2)(Math.ceil(t / 12)), n = (0, r.log2)(i), s = 12 * i; this.Ei.length <= n && (this.Ei.length = n + 1); var e = this.Ei[n]; return e || (this.Ei[n] = e = new Uint16Array(s)), e }, i.prototype.packInterleavedGeometry = function(t, i, n, s, e) { for (var h = i.uint32View, o = i.float32View, u = s / this.vertexSize, a = t.uvs, l = t.indices, c = t.vertexData, f = t.Ft.baseTexture.ht, v = Math.min(t.worldAlpha, 1), d = v < 1 && t.Ft.baseTexture.alphaMode ? (0, r.premultiplyTint)(t.xi, v) : t.xi + (255 * v << 24), _ = 0; _ < c.length; _ += 2) o[s++] = c[_], o[s++] = c[_ + 1], o[s++] = a[_], o[s++] = a[_ + 1], h[s++] = d, o[s++] = f; for (_ = 0; _ < l.length; _++) n[e++] = u + l[_] }, i.Ni = [], i.Ri = [], i }(Q), bi = function() { function t(t, i) { if (this.vertexSrc = t, this.fragTemplate = i, this.programCache = {}, this.defaultGroupCache = {}, i.indexOf("%count%") < 0) throw new Error('Fragment template must contain "%count%".'); if (i.indexOf("%forloop%") < 0) throw new Error('Fragment template must contain "%forloop%".') } return t.prototype.generateShader = function(t) { if (!this.programCache[t]) { for (var i = new Int32Array(t), n = 0; n < t; n++) i[n] = n; this.defaultGroupCache[t] = z.from({ uSamplers: i }, !0); var s = this.fragTemplate; s = (s = s.replace(/%count%/gi, "" + t)).replace(/%forloop%/gi, this.generateSampleSrc(t)), this.programCache[t] = new Pt(this.vertexSrc, s) } var e = { tint: new Float32Array([1, 1, 1, 1]), translationMatrix: new u.y3, default: this.defaultGroupCache[t] }; return new xt(this.programCache[t], e) }, t.prototype.generateSampleSrc = function(t) { var i = ""; i += "\n", i += "\n"; for (var n = 0; n < t; n++) n > 0 && (i += "\nelse "), n < t - 1 && (i += "if(vTextureId < " + n + ".5)"), i += "\n{", i += "\n\tcolor = texture2D(uSamplers[" + n + "], vTextureCoord);", i += "\n}"; return i += "\n", i += "\n" }, t }(), wi = function(t) { function i(i) { void 0 === i && (i = !1); var n = t.call(this) || this; return n.Pi = new D(null, i, !1), n.Oi = new D(null, i, !0), n.addAttribute("aVertexPosition", n.Pi, 2, !1, e.vK.FLOAT).addAttribute("aTextureCoord", n.Pi, 2, !1, e.vK.FLOAT).addAttribute("aColor", n.Pi, 4, !0, e.vK.UNSIGNED_BYTE).addAttribute("aTextureId", n.Pi, 1, !0, e.vK.FLOAT).addIndex(n.Oi), n } return f(i, t), i }(X), gi = "precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor * tint;\n}\n", yi = "varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n vec4 color;\n %forloop%\n gl_FragColor = color * vColor;\n}\n", Ei = function() { function t() {} return t.create = function(t) { var i = Object.assign({ vertex: gi, fragment: yi, geometryClass: wi, vertexSize: 6 }, t), n = i.vertex, s = i.fragment, e = i.vertexSize, r = i.geometryClass; return function(t) { function i(i) { var h = t.call(this, i) || this; return h.shaderGenerator = new bi(n, s), h.geometryClass = r, h.vertexSize = e, h } return f(i, t), i }(mi) }, Object.defineProperty(t, "defaultVertexSrc", { get: function() { return gi }, enumerable: !1, configurable: !0 }), Object.defineProperty(t, "defaultFragmentTemplate", { get: function() { return yi }, enumerable: !1, configurable: !0 }), t }().create(), Si = {}, Ai = function(t) { Object.defineProperty(Si, t, { get: function() { return (0, r.deprecation)("6.0.0", "PIXI.systems." + t + " has moved to PIXI." + t), O[t] } }) }; for (var Ti in O) Ai(Ti); var Mi = {}, Oi = function(t) { Object.defineProperty(Mi, t, { get: function() { return (0, r.deprecation)("6.0.0", "PIXI.resources." + t + " has moved to PIXI." + t), hi[t] } }) }; for (var Ti in hi) Oi(Ti) }, 6480: (t, i, n) => { "use strict"; n.d(i, { Ql: () => z, W2: () => q, YZ: () => h, s$: () => Y }); var s = n(3930), e = n(229), r = n(6335); /*! * @pixi/display - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/display is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ s.X.SORTABLE_CHILDREN = !1; var h = function() { function t() { this.minX = 1 / 0, this.minY = 1 / 0, this.maxX = -1 / 0, this.maxY = -1 / 0, this.rect = null, this.updateID = -1 } return t.prototype.isEmpty = function() { return this.minX > this.maxX || this.minY > this.maxY }, t.prototype.clear = function() { this.minX = 1 / 0, this.minY = 1 / 0, this.maxX = -1 / 0, this.maxY = -1 / 0 }, t.prototype.getRectangle = function(t) { return this.minX > this.maxX || this.minY > this.maxY ? e.Ae.EMPTY : ((t = t || new e.Ae(0, 0, 1, 1)).x = this.minX, t.y = this.minY, t.width = this.maxX - this.minX, t.height = this.maxY - this.minY, t) }, t.prototype.addPoint = function(t) { this.minX = Math.min(this.minX, t.x), this.maxX = Math.max(this.maxX, t.x), this.minY = Math.min(this.minY, t.y), this.maxY = Math.max(this.maxY, t.y) }, t.prototype.addPointMatrix = function(t, i) { var n = t.a * i.x + t.c * i.y + t.tx, s = t.b * i.x + t.d * i.y + t.ty; this.minX = Math.min(this.minX, n), this.maxX = Math.max(this.maxX, n), this.minY = Math.min(this.minY, s), this.maxY = Math.max(this.maxY, s) }, t.prototype.addQuad = function(t) { var i = this.minX, n = this.minY, s = this.maxX, e = this.maxY, r = t[0], h = t[1]; i = r < i ? r : i, n = h < n ? h : n, s = r > s ? r : s, e = h > e ? h : e, i = (r = t[2]) < i ? r : i, n = (h = t[3]) < n ? h : n, s = r > s ? r : s, e = h > e ? h : e, i = (r = t[4]) < i ? r : i, n = (h = t[5]) < n ? h : n, s = r > s ? r : s, e = h > e ? h : e, n = (h = t[7]) < n ? h : n, s = (r = t[6]) > s ? r : s, e = h > e ? h : e, this.minX = i = r < i ? r : i, this.minY = n, this.maxX = s, this.maxY = e }, t.prototype.addFrame = function(t, i, n, s, e) { this.addFrameMatrix(t.worldTransform, i, n, s, e) }, t.prototype.addFrameMatrix = function(t, i, n, s, e) { var r = t.a, h = t.b, o = t.c, u = t.d, a = t.tx, l = t.ty, c = this.minX, f = this.minY, v = this.maxX, d = this.maxY, _ = r * i + o * n + a, p = h * i + u * n + l; c = _ < c ? _ : c, f = p < f ? p : f, v = _ > v ? _ : v, d = p > d ? p : d, c = (_ = r * s + o * n + a) < c ? _ : c, f = (p = h * s + u * n + l) < f ? p : f, v = _ > v ? _ : v, d = p > d ? p : d, c = (_ = r * i + o * e + a) < c ? _ : c, f = (p = h * i + u * e + l) < f ? p : f, v = _ > v ? _ : v, d = p > d ? p : d, f = (p = h * s + u * e + l) < f ? p : f, v = (_ = r * s + o * e + a) > v ? _ : v, d = p > d ? p : d, this.minX = c = _ < c ? _ : c, this.minY = f, this.maxX = v, this.maxY = d }, t.prototype.addVertexData = function(t, i, n) { for (var s = this.minX, e = this.minY, r = this.maxX, h = this.maxY, o = i; o < n; o += 2) { var u = t[o], a = t[o + 1]; s = u < s ? u : s, e = a < e ? a : e, r = u > r ? u : r, h = a > h ? a : h } this.minX = s, this.minY = e, this.maxX = r, this.maxY = h }, t.prototype.addVertices = function(t, i, n, s) { this.addVerticesMatrix(t.worldTransform, i, n, s) }, t.prototype.addVerticesMatrix = function(t, i, n, s, e, r) { void 0 === e && (e = 0), void 0 === r && (r = e); for (var h = t.a, o = t.b, u = t.c, a = t.d, l = t.tx, c = t.ty, f = this.minX, v = this.minY, d = this.maxX, _ = this.maxY, p = n; p < s; p += 2) { var m = i[p], b = i[p + 1], w = h * m + u * b + l, g = a * b + o * m + c; f = Math.min(f, w - e), d = Math.max(d, w + e), v = Math.min(v, g - r), _ = Math.max(_, g + r) } this.minX = f, this.minY = v, this.maxX = d, this.maxY = _ }, t.prototype.addBounds = function(t) { var i = this.minX, n = this.minY, s = this.maxX, e = this.maxY; this.minX = t.minX < i ? t.minX : i, this.minY = t.minY < n ? t.minY : n, this.maxX = t.maxX > s ? t.maxX : s, this.maxY = t.maxY > e ? t.maxY : e }, t.prototype.addBoundsMask = function(t, i) { var n = t.minX > i.minX ? t.minX : i.minX, s = t.minY > i.minY ? t.minY : i.minY, e = t.maxX < i.maxX ? t.maxX : i.maxX, r = t.maxY < i.maxY ? t.maxY : i.maxY; if (n <= e && s <= r) { var h = this.minX, o = this.minY, u = this.maxX, a = this.maxY; this.minX = n < h ? n : h, this.minY = s < o ? s : o, this.maxX = e > u ? e : u, this.maxY = r > a ? r : a } }, t.prototype.addBoundsMatrix = function(t, i) { this.addFrameMatrix(i, t.minX, t.minY, t.maxX, t.maxY) }, t.prototype.addBoundsArea = function(t, i) { var n = t.minX > i.x ? t.minX : i.x, s = t.minY > i.y ? t.minY : i.y, e = t.maxX < i.x + i.width ? t.maxX : i.x + i.width, r = t.maxY < i.y + i.height ? t.maxY : i.y + i.height; if (n <= e && s <= r) { var h = this.minX, o = this.minY, u = this.maxX, a = this.maxY; this.minX = n < h ? n : h, this.minY = s < o ? s : o, this.maxX = e > u ? e : u, this.maxY = r > a ? r : a } }, t.prototype.pad = function(t, i) { void 0 === t && (t = 0), void 0 === i && (i = t), this.isEmpty() || (this.minX -= t, this.maxX += t, this.minY -= i, this.maxY += i) }, t.prototype.addFramePad = function(t, i, n, s, e, r) { i -= r, n += e, s += r, this.minX = this.minX < (t -= e) ? this.minX : t, this.maxX = this.maxX > n ? this.maxX : n, this.minY = this.minY < i ? this.minY : i, this.maxY = this.maxY > s ? this.maxY : s }, t }(), o = function(t, i) { return (o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]) })(t, i) }; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ function u(t, i) { function n() { this.constructor = t } o(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) } var a, l, c, f, v, d, _, p, m, b, w, g, y, E, S, A, T, M, O, I, N, R, P, x, L, C, U, k, F, B, D, j, G, W, H, X, V, $, Y = function(t) { function i() { var i = t.call(this) || this; return i.tempDisplayObjectParent = null, i.transform = new e.wx, i.alpha = 1, i.visible = !0, i.renderable = !0, i.cullable = !1, i.cullArea = null, i.parent = null, i.worldAlpha = 1, i.Li = 0, i.Ci = 0, i.filterArea = null, i.filters = null, i.Ui = null, i.ki = new h, i.Fi = null, i.Bi = 0, i.Di = null, i.ji = null, i.Gi = null, i.Wi = 0, i.Hi = !1, i.isSprite = !1, i.isMask = !1, i } return u(i, t), i.mixin = function(t) { for (var n = Object.keys(t), s = 0; s < n.length; ++s) { var e = n[s]; Object.defineProperty(i.prototype, e, Object.getOwnPropertyDescriptor(t, e)) } }, Object.defineProperty(i.prototype, "destroyed", { get: function() { return this.Hi }, enumerable: !1, configurable: !0 }), i.prototype.Xi = function() { this.parent ? (this.parent.Xi(), this.transform.updateTransform(this.parent.transform)) : this.transform.updateTransform(this.ri.transform) }, i.prototype.updateTransform = function() { this.Bi++, this.transform.updateTransform(this.parent.transform), this.worldAlpha = this.alpha * this.parent.worldAlpha }, i.prototype.getBounds = function(t, i) { return t || (this.parent ? (this.Xi(), this.updateTransform()) : (this.parent = this.ri, this.updateTransform(), this.parent = null)), this.ki.updateID !== this.Bi && (this.calculateBounds(), this.ki.updateID = this.Bi), i || (this.Di || (this.Di = new e.Ae), i = this.Di), this.ki.getRectangle(i) }, i.prototype.getLocalBounds = function(t) { t || (this.ji || (this.ji = new e.Ae), t = this.ji), this.Fi || (this.Fi = new h); var i = this.transform, n = this.parent; this.parent = null, this.transform = this.ri.transform; var s = this.ki, r = this.Bi; this.ki = this.Fi; var o = this.getBounds(!1, t); return this.parent = n, this.transform = i, this.ki = s, this.ki.updateID += this.Bi - r, o }, i.prototype.toGlobal = function(t, i, n) { return void 0 === n && (n = !1), n || (this.Xi(), this.parent ? this.displayObjectUpdateTransform() : (this.parent = this.ri, this.displayObjectUpdateTransform(), this.parent = null)), this.worldTransform.apply(t, i) }, i.prototype.toLocal = function(t, i, n, s) { return i && (t = i.toGlobal(t, n, s)), s || (this.Xi(), this.parent ? this.displayObjectUpdateTransform() : (this.parent = this.ri, this.displayObjectUpdateTransform(), this.parent = null)), this.worldTransform.applyInverse(t, n) }, i.prototype.setParent = function(t) { if (!t || !t.addChild) throw new Error("setParent: Argument must be a Container"); return t.addChild(this), t }, i.prototype.setTransform = function(t, i, n, s, e, r, h, o, u) { return void 0 === t && (t = 0), void 0 === i && (i = 0), void 0 === n && (n = 1), void 0 === s && (s = 1), void 0 === e && (e = 0), void 0 === r && (r = 0), void 0 === h && (h = 0), void 0 === o && (o = 0), void 0 === u && (u = 0), this.position.x = t, this.position.y = i, this.scale.x = n || 1, this.scale.y = s || 1, this.rotation = e, this.skew.x = r, this.skew.y = h, this.pivot.x = o, this.pivot.y = u, this }, i.prototype.destroy = function(t) { this.parent && this.parent.removeChild(this), this.emit("destroyed"), this.removeAllListeners(), this.transform = null, this.parent = null, this.ki = null, this.mask = null, this.cullArea = null, this.filters = null, this.filterArea = null, this.hitArea = null, this.interactive = !1, this.interactiveChildren = !1, this.Hi = !0 }, Object.defineProperty(i.prototype, "ri", { get: function() { return null === this.tempDisplayObjectParent && (this.tempDisplayObjectParent = new z), this.tempDisplayObjectParent }, enumerable: !1, configurable: !0 }), i.prototype.enableTempParent = function() { var t = this.parent; return this.parent = this.ri, t }, i.prototype.disableTempParent = function(t) { this.parent = t }, Object.defineProperty(i.prototype, "x", { get: function() { return this.position.x }, set: function(t) { this.transform.position.x = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "y", { get: function() { return this.position.y }, set: function(t) { this.transform.position.y = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "worldTransform", { get: function() { return this.transform.worldTransform }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "localTransform", { get: function() { return this.transform.localTransform }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "position", { get: function() { return this.transform.position }, set: function(t) { this.transform.position.copyFrom(t) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "scale", { get: function() { return this.transform.scale }, set: function(t) { this.transform.scale.copyFrom(t) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "pivot", { get: function() { return this.transform.pivot }, set: function(t) { this.transform.pivot.copyFrom(t) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "skew", { get: function() { return this.transform.skew }, set: function(t) { this.transform.skew.copyFrom(t) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "rotation", { get: function() { return this.transform.rotation }, set: function(t) { this.transform.rotation = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "angle", { get: function() { return this.transform.rotation * e.jl }, set: function(t) { this.transform.rotation = t * e.ZX }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "zIndex", { get: function() { return this.Ci }, set: function(t) { this.Ci = t, this.parent && (this.parent.sortDirty = !0) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "worldVisible", { get: function() { var t = this; do { if (!t.visible) return !1; t = t.parent } while (t); return !0 }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "mask", { get: function() { return this.Gi }, set: function(t) { if (this.Gi !== t) { var i; if (this.Gi)(i = this.Gi.maskObject || this.Gi).Wi--, 0 === i.Wi && (i.renderable = !0, i.isMask = !1); if (this.Gi = t, this.Gi) 0 === (i = this.Gi.maskObject || this.Gi).Wi && (i.renderable = !1, i.isMask = !0), i.Wi++ } }, enumerable: !1, configurable: !0 }), i }(r.EventEmitter), z = function(t) { function i() { var i = null !== t && t.apply(this, arguments) || this; return i.sortDirty = null, i } return u(i, t), i }(Y); function K(t, i) { return t.zIndex === i.zIndex ? t.Li - i.Li : t.zIndex - i.zIndex } Y.prototype.displayObjectUpdateTransform = Y.prototype.updateTransform, (l = a || (a = {}))[l.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", l[l.WEBGL = 1] = "WEBGL", l[l.WEBGL2 = 2] = "WEBGL2", (f = c || (c = {}))[f.UNKNOWN = 0] = "UNKNOWN", f[f.WEBGL = 1] = "WEBGL", f[f.CANVAS = 2] = "CANVAS", (d = v || (v = {}))[d.COLOR = 16384] = "COLOR", d[d.DEPTH = 256] = "DEPTH", d[d.STENCIL = 1024] = "STENCIL", (p = _ || (_ = {}))[p.NORMAL = 0] = "NORMAL", p[p.ADD = 1] = "ADD", p[p.MULTIPLY = 2] = "MULTIPLY", p[p.SCREEN = 3] = "SCREEN", p[p.OVERLAY = 4] = "OVERLAY", p[p.DARKEN = 5] = "DARKEN", p[p.LIGHTEN = 6] = "LIGHTEN", p[p.COLOR_DODGE = 7] = "COLOR_DODGE", p[p.COLOR_BURN = 8] = "COLOR_BURN", p[p.HARD_LIGHT = 9] = "HARD_LIGHT", p[p.SOFT_LIGHT = 10] = "SOFT_LIGHT", p[p.DIFFERENCE = 11] = "DIFFERENCE", p[p.EXCLUSION = 12] = "EXCLUSION", p[p.HUE = 13] = "HUE", p[p.SATURATION = 14] = "SATURATION", p[p.COLOR = 15] = "COLOR", p[p.LUMINOSITY = 16] = "LUMINOSITY", p[p.NORMAL_NPM = 17] = "NORMAL_NPM", p[p.ADD_NPM = 18] = "ADD_NPM", p[p.SCREEN_NPM = 19] = "SCREEN_NPM", p[p.NONE = 20] = "NONE", p[p.SRC_OVER = 0] = "SRC_OVER", p[p.SRC_IN = 21] = "SRC_IN", p[p.SRC_OUT = 22] = "SRC_OUT", p[p.SRC_ATOP = 23] = "SRC_ATOP", p[p.DST_OVER = 24] = "DST_OVER", p[p.DST_IN = 25] = "DST_IN", p[p.DST_OUT = 26] = "DST_OUT", p[p.DST_ATOP = 27] = "DST_ATOP", p[p.ERASE = 26] = "ERASE", p[p.SUBTRACT = 28] = "SUBTRACT", p[p.XOR = 29] = "XOR", (b = m || (m = {}))[b.POINTS = 0] = "POINTS", b[b.LINES = 1] = "LINES", b[b.LINE_LOOP = 2] = "LINE_LOOP", b[b.LINE_STRIP = 3] = "LINE_STRIP", b[b.TRIANGLES = 4] = "TRIANGLES", b[b.TRIANGLE_STRIP = 5] = "TRIANGLE_STRIP", b[b.TRIANGLE_FAN = 6] = "TRIANGLE_FAN", (g = w || (w = {}))[g.RGBA = 6408] = "RGBA", g[g.RGB = 6407] = "RGB", g[g.RG = 33319] = "RG", g[g.RED = 6403] = "RED", g[g.RGBA_INTEGER = 36249] = "RGBA_INTEGER", g[g.RGB_INTEGER = 36248] = "RGB_INTEGER", g[g.RG_INTEGER = 33320] = "RG_INTEGER", g[g.RED_INTEGER = 36244] = "RED_INTEGER", g[g.ALPHA = 6406] = "ALPHA", g[g.LUMINANCE = 6409] = "LUMINANCE", g[g.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", g[g.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", g[g.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", (E = y || (y = {}))[E.TEXTURE_2D = 3553] = "TEXTURE_2D", E[E.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", E[E.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", E[E.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", E[E.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", E[E.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", E[E.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", E[E.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", E[E.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", (A = S || (S = {}))[A.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", A[A.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", A[A.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", A[A.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", A[A.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", A[A.UNSIGNED_INT = 5125] = "UNSIGNED_INT", A[A.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", A[A.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", A[A.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", A[A.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", A[A.BYTE = 5120] = "BYTE", A[A.SHORT = 5122] = "SHORT", A[A.INT = 5124] = "INT", A[A.FLOAT = 5126] = "FLOAT", A[A.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", A[A.HALF_FLOAT = 36193] = "HALF_FLOAT", (M = T || (T = {}))[M.FLOAT = 0] = "FLOAT", M[M.INT = 1] = "INT", M[M.UINT = 2] = "UINT", (I = O || (O = {}))[I.NEAREST = 0] = "NEAREST", I[I.LINEAR = 1] = "LINEAR", (R = N || (N = {}))[R.CLAMP = 33071] = "CLAMP", R[R.REPEAT = 10497] = "REPEAT", R[R.MIRRORED_REPEAT = 33648] = "MIRRORED_REPEAT", (x = P || (P = {}))[x.OFF = 0] = "OFF", x[x.POW2 = 1] = "POW2", x[x.ON = 2] = "ON", x[x.ON_MANUAL = 3] = "ON_MANUAL", (C = L || (L = {}))[C.NPM = 0] = "NPM", C[C.UNPACK = 1] = "UNPACK", C[C.PMA = 2] = "PMA", C[C.NO_PREMULTIPLIED_ALPHA = 0] = "NO_PREMULTIPLIED_ALPHA", C[C.PREMULTIPLY_ON_UPLOAD = 1] = "PREMULTIPLY_ON_UPLOAD", C[C.PREMULTIPLY_ALPHA = 2] = "PREMULTIPLY_ALPHA", C[C.PREMULTIPLIED_ALPHA = 2] = "PREMULTIPLIED_ALPHA", (k = U || (U = {}))[k.NO = 0] = "NO", k[k.YES = 1] = "YES", k[k.AUTO = 2] = "AUTO", k[k.BLEND = 0] = "BLEND", k[k.CLEAR = 1] = "CLEAR", k[k.BLIT = 2] = "BLIT", (B = F || (F = {}))[B.AUTO = 0] = "AUTO", B[B.MANUAL = 1] = "MANUAL", (j = D || (D = {})).LOW = "lowp", j.MEDIUM = "mediump", j.HIGH = "highp", (W = G || (G = {}))[W.NONE = 0] = "NONE", W[W.SCISSOR = 1] = "SCISSOR", W[W.STENCIL = 2] = "STENCIL", W[W.SPRITE = 3] = "SPRITE", (X = H || (H = {}))[X.NONE = 0] = "NONE", X[X.LOW = 2] = "LOW", X[X.MEDIUM = 4] = "MEDIUM", X[X.HIGH = 8] = "HIGH", ($ = V || (V = {}))[$.ELEMENT_ARRAY_BUFFER = 34963] = "ELEMENT_ARRAY_BUFFER", $[$.ARRAY_BUFFER = 34962] = "ARRAY_BUFFER", $[$.UNIFORM_BUFFER = 35345] = "UNIFORM_BUFFER"; var q = function(t) { function i() { var i = t.call(this) || this; return i.children = [], i.sortableChildren = s.X.SORTABLE_CHILDREN, i.sortDirty = !1, i } return u(i, t), i.prototype.onChildrenChange = function(t) {}, i.prototype.addChild = function() { for (var t = arguments, i = [], n = 0; n < arguments.length; n++) i[n] = t[n]; if (i.length > 1) for (var s = 0; s < i.length; s++) this.addChild(i[s]); else { var e = i[0]; e.parent && e.parent.removeChild(e), e.parent = this, this.sortDirty = !0, e.transform.P = -1, this.children.push(e), this.Bi++, this.onChildrenChange(this.children.length - 1), this.emit("childAdded", e, this, this.children.length - 1), e.emit("added", this) } return i[0] }, i.prototype.addChildAt = function(t, i) { if (i < 0 || i > this.children.length) throw new Error(t + "addChildAt: The index " + i + " supplied is out of bounds " + this.children.length); return t.parent && t.parent.removeChild(t), t.parent = this, this.sortDirty = !0, t.transform.P = -1, this.children.splice(i, 0, t), this.Bi++, this.onChildrenChange(i), t.emit("added", this), this.emit("childAdded", t, this, i), t }, i.prototype.swapChildren = function(t, i) { if (t !== i) { var n = this.getChildIndex(t), s = this.getChildIndex(i); this.children[n] = i, this.children[s] = t, this.onChildrenChange(n < s ? n : s) } }, i.prototype.getChildIndex = function(t) { var i = this.children.indexOf(t); if (-1 === i) throw new Error("The supplied DisplayObject must be a child of the caller"); return i }, i.prototype.setChildIndex = function(t, i) { if (i < 0 || i >= this.children.length) throw new Error("The index " + i + " supplied is out of bounds " + this.children.length); var n = this.getChildIndex(t); (0, r.removeItems)(this.children, n, 1), this.children.splice(i, 0, t), this.onChildrenChange(i) }, i.prototype.getChildAt = function(t) { if (t < 0 || t >= this.children.length) throw new Error("getChildAt: Index (" + t + ") does not exist."); return this.children[t] }, i.prototype.removeChild = function() { for (var t = arguments, i = [], n = 0; n < arguments.length; n++) i[n] = t[n]; if (i.length > 1) for (var s = 0; s < i.length; s++) this.removeChild(i[s]); else { var e = i[0], h = this.children.indexOf(e); if (-1 === h) return null; e.parent = null, e.transform.P = -1, (0, r.removeItems)(this.children, h, 1), this.Bi++, this.onChildrenChange(h), e.emit("removed", this), this.emit("childRemoved", e, this, h) } return i[0] }, i.prototype.removeChildAt = function(t) { var i = this.getChildAt(t); return i.parent = null, i.transform.P = -1, (0, r.removeItems)(this.children, t, 1), this.Bi++, this.onChildrenChange(t), i.emit("removed", this), this.emit("childRemoved", i, this, t), i }, i.prototype.removeChildren = function(t, i) { void 0 === t && (t = 0), void 0 === i && (i = this.children.length); var n, s = i - t; if (s > 0 && s <= i) { n = this.children.splice(t, s); for (var e = 0; e < n.length; ++e) n[e].parent = null, n[e].transform && (n[e].transform.P = -1); this.Bi++, this.onChildrenChange(t); for (e = 0; e < n.length; ++e) n[e].emit("removed", this), this.emit("childRemoved", n[e], this, e); return n } if (0 === s && 0 === this.children.length) return []; throw new RangeError("removeChildren: numeric values are outside the acceptable range.") }, i.prototype.sortChildren = function() { for (var t = !1, i = 0, n = this.children.length; i < n; ++i) { var s = this.children[i]; s.Li = i, t || 0 === s.zIndex || (t = !0) } t && this.children.length > 1 && this.children.sort(K), this.sortDirty = !1 }, i.prototype.updateTransform = function() { this.sortableChildren && this.sortDirty && this.sortChildren(), this.Bi++, this.transform.updateTransform(this.parent.transform), this.worldAlpha = this.alpha * this.parent.worldAlpha; for (var t = 0, i = this.children.length; t < i; ++t) { var n = this.children[t]; n.visible && n.updateTransform() } }, i.prototype.calculateBounds = function() { this.ki.clear(), this.$i(); for (var t = 0; t < this.children.length; t++) { var i = this.children[t]; if (i.visible && i.renderable) if (i.calculateBounds(), i.Gi) { var n = i.Gi.maskObject || i.Gi; n.calculateBounds(), this.ki.addBoundsMask(i.ki, n.ki) } else i.filterArea ? this.ki.addBoundsArea(i.ki, i.filterArea) : this.ki.addBounds(i.ki) } this.ki.updateID = this.Bi }, i.prototype.getLocalBounds = function(i, n) { void 0 === n && (n = !1); var s = t.prototype.getLocalBounds.call(this, i); if (!n) for (var e = 0, r = this.children.length; e < r; ++e) { var h = this.children[e]; h.visible && h.updateTransform() } return s }, i.prototype.$i = function() {}, i.prototype.zi = function(t) { var n = t.renderTexture.sourceFrame; if (n.width > 0 && n.height > 0) { var s, e; if (this.cullArea ? (s = this.cullArea, e = this.worldTransform) : this.Ki !== i.prototype.Ki && (s = this.getBounds(!0)), s && n.intersects(s, e)) this.Ki(t); else if (this.cullArea) return; for (var r = 0, h = this.children.length; r < h; ++r) { var o = this.children[r], u = o.cullable; o.cullable = u || !this.cullArea, o.render(t), o.cullable = u } } }, i.prototype.render = function(t) { if (this.visible && !(this.worldAlpha <= 0) && this.renderable) if (this.Gi || this.filters && this.filters.length) this.renderAdvanced(t); else if (this.cullable) this.zi(t); else { this.Ki(t); for (var i = 0, n = this.children.length; i < n; ++i) this.children[i].render(t) } }, i.prototype.renderAdvanced = function(t) { var i = this.filters, n = this.Gi; if (i) { this.Ui || (this.Ui = []), this.Ui.length = 0; for (var s = 0; s < i.length; s++) i[s].enabled && this.Ui.push(i[s]) } var e = i && this.Ui && this.Ui.length || n && (!n.isMaskData || n.enabled && (n.autoDetect || n.type !== G.NONE)); if (e && t.batch.flush(), i && this.Ui && this.Ui.length && t.filter.push(this, this.Ui), n && t.mask.push(this, this.Gi), this.cullable) this.zi(t); else { this.Ki(t); s = 0; for (var r = this.children.length; s < r; ++s) this.children[s].render(t) } e && t.batch.flush(), n && t.mask.pop(this), i && this.Ui && this.Ui.length && t.filter.pop() }, i.prototype.Ki = function(t) {}, i.prototype.destroy = function(i) { t.prototype.destroy.call(this), this.sortDirty = !1; var n = "boolean" == typeof i ? i : i && i.children, s = this.removeChildren(0, this.children.length); if (n) for (var e = 0; e < s.length; ++e) s[e].destroy(i) }, Object.defineProperty(i.prototype, "width", { get: function() { return this.scale.x * this.getLocalBounds().width }, set: function(t) { var i = this.getLocalBounds().width; this.scale.x = 0 !== i ? t / i : 1, this.$ = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "height", { get: function() { return this.scale.y * this.getLocalBounds().height }, set: function(t) { var i = this.getLocalBounds().height; this.scale.y = 0 !== i ? t / i : 1, this.J = t }, enumerable: !1, configurable: !0 }), i }(Y); q.prototype.containerUpdateTransform = q.prototype.updateTransform }, 5273: (t, i, n) => { "use strict"; var s = n(4577), e = function(t, i) { return (e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]) })(t, i) }; /*! * @pixi/filter-color-matrix - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/filter-color-matrix is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var r = function(t) { function i() { var i = this, n = { m: new Float32Array([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]), uAlpha: 1 }; return (i = t.call(this, s.Y9, "varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n", n) || this).alpha = 1, i } return function(t, i) { function n() { this.constructor = t } e(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) }(i, t), i.prototype.qi = function(t, i) { void 0 === i && (i = !1); var n = t; i && (this.Zi(n, this.uniforms.m, t), n = this.Ji(n)), this.uniforms.m = n }, i.prototype.Zi = function(t, i, n) { return t[0] = i[0] * n[0] + i[1] * n[5] + i[2] * n[10] + i[3] * n[15], t[1] = i[0] * n[1] + i[1] * n[6] + i[2] * n[11] + i[3] * n[16], t[2] = i[0] * n[2] + i[1] * n[7] + i[2] * n[12] + i[3] * n[17], t[3] = i[0] * n[3] + i[1] * n[8] + i[2] * n[13] + i[3] * n[18], t[4] = i[0] * n[4] + i[1] * n[9] + i[2] * n[14] + i[3] * n[19] + i[4], t[5] = i[5] * n[0] + i[6] * n[5] + i[7] * n[10] + i[8] * n[15], t[6] = i[5] * n[1] + i[6] * n[6] + i[7] * n[11] + i[8] * n[16], t[7] = i[5] * n[2] + i[6] * n[7] + i[7] * n[12] + i[8] * n[17], t[8] = i[5] * n[3] + i[6] * n[8] + i[7] * n[13] + i[8] * n[18], t[9] = i[5] * n[4] + i[6] * n[9] + i[7] * n[14] + i[8] * n[19] + i[9], t[10] = i[10] * n[0] + i[11] * n[5] + i[12] * n[10] + i[13] * n[15], t[11] = i[10] * n[1] + i[11] * n[6] + i[12] * n[11] + i[13] * n[16], t[12] = i[10] * n[2] + i[11] * n[7] + i[12] * n[12] + i[13] * n[17], t[13] = i[10] * n[3] + i[11] * n[8] + i[12] * n[13] + i[13] * n[18], t[14] = i[10] * n[4] + i[11] * n[9] + i[12] * n[14] + i[13] * n[19] + i[14], t[15] = i[15] * n[0] + i[16] * n[5] + i[17] * n[10] + i[18] * n[15], t[16] = i[15] * n[1] + i[16] * n[6] + i[17] * n[11] + i[18] * n[16], t[17] = i[15] * n[2] + i[16] * n[7] + i[17] * n[12] + i[18] * n[17], t[18] = i[15] * n[3] + i[16] * n[8] + i[17] * n[13] + i[18] * n[18], t[19] = i[15] * n[4] + i[16] * n[9] + i[17] * n[14] + i[18] * n[19] + i[19], t }, i.prototype.Ji = function(t) { var i = new Float32Array(t); return i[4] /= 255, i[9] /= 255, i[14] /= 255, i[19] /= 255, i }, i.prototype.brightness = function(t, i) { this.qi([t, 0, 0, 0, 0, 0, t, 0, 0, 0, 0, 0, t, 0, 0, 0, 0, 0, 1, 0], i) }, i.prototype.tint = function(t, i) { this.qi([(t >> 16 & 255) / 255, 0, 0, 0, 0, 0, (t >> 8 & 255) / 255, 0, 0, 0, 0, 0, (255 & t) / 255, 0, 0, 0, 0, 0, 1, 0], i) }, i.prototype.greyscale = function(t, i) { this.qi([t, t, t, 0, 0, t, t, t, 0, 0, t, t, t, 0, 0, 0, 0, 0, 1, 0], i) }, i.prototype.blackAndWhite = function(t) { this.qi([.3, .6, .1, 0, 0, .3, .6, .1, 0, 0, .3, .6, .1, 0, 0, 0, 0, 0, 1, 0], t) }, i.prototype.hue = function(t, i) { t = (t || 0) / 180 * Math.PI; var n = Math.cos(t), s = Math.sin(t), e = 1 / 3, r = (0, Math.sqrt)(e); this.qi([n + (1 - n) * e, e * (1 - n) - r * s, e * (1 - n) + r * s, 0, 0, e * (1 - n) + r * s, n + e * (1 - n), e * (1 - n) - r * s, 0, 0, e * (1 - n) - r * s, e * (1 - n) + r * s, n + e * (1 - n), 0, 0, 0, 0, 0, 1, 0], i) }, i.prototype.contrast = function(t, i) { var n = (t || 0) + 1, s = -.5 * (n - 1); this.qi([n, 0, 0, 0, s, 0, n, 0, 0, s, 0, 0, n, 0, s, 0, 0, 0, 1, 0], i) }, i.prototype.saturate = function(t, i) { void 0 === t && (t = 0); var n = 2 * t / 3 + 1, s = -.5 * (n - 1); this.qi([n, s, s, 0, 0, s, n, s, 0, 0, s, s, n, 0, 0, 0, 0, 0, 1, 0], i) }, i.prototype.desaturate = function() { this.saturate(-1) }, i.prototype.negative = function(t) { this.qi([-1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0], t) }, i.prototype.sepia = function(t) { this.qi([.393, .7689999, .18899999, 0, 0, .349, .6859999, .16799999, 0, 0, .272, .5339999, .13099999, 0, 0, 0, 0, 0, 1, 0], t) }, i.prototype.technicolor = function(t) { this.qi([1.9125277891456083, -.8545344976951645, -.09155508482755585, 0, 11.793603434377337, -.3087833385928097, 1.7658908555458428, -.10601743074722245, 0, -70.35205161461398, -.231103377548616, -.7501899197440212, 1.847597816108189, 0, 30.950940869491138, 0, 0, 0, 1, 0], t) }, i.prototype.polaroid = function(t) { this.qi([1.438, -.062, -.062, 0, 0, -.122, 1.378, -.122, 0, 0, -.016, -.016, 1.483, 0, 0, 0, 0, 0, 1, 0], t) }, i.prototype.toBGR = function(t) { this.qi([0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0], t) }, i.prototype.kodachrome = function(t) { this.qi([1.1285582396593525, -.3967382283601348, -.03992559172921793, 0, 63.72958762196502, -.16404339962244616, 1.0835251566291304, -.05498805115633132, 0, 24.732407896706203, -.16786010706155763, -.5603416277695248, 1.6014850761964943, 0, 35.62982807460946, 0, 0, 0, 1, 0], t) }, i.prototype.browni = function(t) { this.qi([.5997023498159715, .34553243048391263, -.2708298674538042, 0, 47.43192855600873, -.037703249837783157, .8609577587992641, .15059552388459913, 0, -36.96841498319127, .24113635128153335, -.07441037908422492, .44972182064877153, 0, -7.562075277591283, 0, 0, 0, 1, 0], t) }, i.prototype.vintage = function(t) { this.qi([.6279345635605994, .3202183420819367, -.03965408211312453, 0, 9.651285835294123, .02578397704808868, .6441188644374771, .03259127616149294, 0, 7.462829176470591, .0466055556782719, -.0851232987247891, .5241648018700465, 0, 5.159190588235296, 0, 0, 0, 1, 0], t) }, i.prototype.colorTone = function(t, i, n, s, e) { var r = ((n = n || 16770432) >> 16 & 255) / 255, h = (n >> 8 & 255) / 255, o = (255 & n) / 255, u = ((s = s || 3375104) >> 16 & 255) / 255, a = (s >> 8 & 255) / 255, l = (255 & s) / 255; this.qi([.3, .59, .11, 0, 0, r, h, o, t = t || .2, 0, u, a, l, i = i || .15, 0, r - u, h - a, o - l, 0, 0], e) }, i.prototype.night = function(t, i) { this.qi([-2 * (t = t || .1), -t, 0, 0, 0, -t, 0, t, 0, 0, 0, t, 2 * t, 0, 0, 0, 0, 0, 1, 0], i) }, i.prototype.predator = function(t, i) { this.qi([11.224130630493164 * t, -4.794486999511719 * t, -2.8746118545532227 * t, 0 * t, .40342438220977783 * t, -3.6330697536468506 * t, 9.193157196044922 * t, -2.951810836791992 * t, 0 * t, -1.316135048866272 * t, -3.2184197902679443 * t, -4.2375030517578125 * t, 7.476448059082031 * t, 0 * t, .8044459223747253 * t, 0, 0, 0, 1, 0], i) }, i.prototype.lsd = function(t) { this.qi([2, -.4, .5, 0, 0, -.5, 2, -.4, 0, 0, -.4, -.5, 3, 0, 0, 0, 0, 0, 1, 0], t) }, i.prototype.reset = function() { this.qi([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], !1) }, Object.defineProperty(i.prototype, "matrix", { get: function() { return this.uniforms.m }, set: function(t) { this.uniforms.m = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "alpha", { get: function() { return this.uniforms.uAlpha }, set: function(t) { this.uniforms.uAlpha = t }, enumerable: !1, configurable: !0 }), i }(s.wn); r.prototype.grayscale = r.prototype.greyscale }, 2877: (t, i, n) => { "use strict"; n.d(i, { TC: () => G }); var s, e, r, h, o = n(4577), u = n(229), a = n(6335), l = n(4936), c = n(6480); (e = s || (s = {})).MITER = "miter", e.BEVEL = "bevel", e.ROUND = "round", (h = r || (r = {})).BUTT = "butt", h.ROUND = "round", h.SQUARE = "square"; var f = { adaptive: !0, maxLength: 10, minSegments: 8, maxSegments: 2048, epsilon: 1e-4, Qi: function(t, i) { if (void 0 === i && (i = 20), !this.adaptive || !t || isNaN(t)) return i; var n = Math.ceil(t / this.maxLength); return n < this.minSegments ? n = this.minSegments : n > this.maxSegments && (n = this.maxSegments), n } }, v = function() { function t() { this.color = 16777215, this.alpha = 1, this.texture = o.xE.WHITE, this.matrix = null, this.visible = !1, this.reset() } return t.prototype.clone = function() { var i = new t; return i.color = this.color, i.alpha = this.alpha, i.texture = this.texture, i.matrix = this.matrix, i.visible = this.visible, i }, t.prototype.reset = function() { this.color = 16777215, this.alpha = 1, this.texture = o.xE.WHITE, this.matrix = null, this.visible = !1 }, t.prototype.destroy = function() { this.texture = null, this.matrix = null }, t }(), d = function(t, i) { return (d = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]) })(t, i) }; function _(t, i) { function n() { this.constructor = t } d(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) } function p(t, i) { var n, s; void 0 === i && (i = !1); var e = t.length; if (!(e < 6)) { for (var r = 0, h = 0, o = t[e - 2], u = t[e - 1]; h < e; h += 2) { var a = t[h], l = t[h + 1]; r += (a - o) * (l + u), o = a, u = l } if (!i && r > 0 || i && r <= 0) { var c = e / 2; for (h = c + c % 2; h < e; h += 2) { var f = e - h - 2, v = e - h - 1, d = h, _ = h + 1; t[f] = (n = [t[d], t[f]])[0], t[d] = n[1], t[v] = (s = [t[_], t[v]])[0], t[_] = s[1] } } } } var m = { build: function(t) { t.points = t.shape.points.slice() }, triangulate: function(t, i) { var n = t.points, s = t.holes, e = i.points, r = i.indices; if (n.length >= 6) { p(n, !1); for (var h = [], o = 0; o < s.length; o++) { var u = s[o]; p(u.points, !0), h.push(n.length / 2), n = n.concat(u.points) } var l = (0, a.earcut)(n, h, 2); if (!l) return; var c = e.length / 2; for (o = 0; o < l.length; o += 3) r.push(l[o] + c), r.push(l[o + 1] + c), r.push(l[o + 2] + c); for (o = 0; o < n.length; o++) e.push(n[o]) } } }, b = { build: function(t) { var i, n, s, e, r, h, o = t.points; if (t.type === u.HS.CIRC) { var a = t.shape; i = a.x, n = a.y, r = h = a.radius, s = e = 0 } else if (t.type === u.HS.ELIP) { var l = t.shape; i = l.x, n = l.y, r = l.width, h = l.height, s = e = 0 } else { var c = t.shape, f = c.width / 2, v = c.height / 2; i = c.x + f, n = c.y + v, s = f - (r = h = Math.max(0, Math.min(c.radius, Math.min(f, v)))), e = v - h } var d = Math.ceil(2.3 * Math.sqrt(r + h)), _ = 8 * d + (s ? 4 : 0) + (e ? 4 : 0); if (o.length = _, 0 !== _) { if (0 === d) return o.length = 8, o[0] = o[6] = i + s, o[1] = o[3] = n + e, o[2] = o[4] = i - s, void(o[5] = o[7] = n - e); var p = 0, m = 4 * d + (s ? 2 : 0) + 2, b = m, w = _, g = i - (T = s + r), y = n + (M = e); if (o[p++] = O = i + T, o[p++] = y, o[--m] = y, o[--m] = g, e) { var E = n - M; o[b++] = g, o[b++] = E, o[--w] = E, o[--w] = O } for (var S = 1; S < d; S++) { var A = Math.PI / 2 * (S / d); g = i - (T = s + Math.cos(A) * r), y = n + (M = e + Math.sin(A) * h), E = n - M; o[p++] = O = i + T, o[p++] = y, o[--m] = y, o[--m] = g, o[b++] = g, o[b++] = E, o[--w] = E, o[--w] = O } var T, M, O; g = i - (T = s), y = n + (M = e + h), E = n - M; o[p++] = O = i + T, o[p++] = y, o[--w] = E, o[--w] = O, s && (o[p++] = g, o[p++] = y, o[--w] = E, o[--w] = g) } }, triangulate: function(t, i) { var n, s, e = t.points, r = i.points, h = i.indices, o = r.length / 2, a = o; if (t.type !== u.HS.RREC) { var l = t.shape; n = l.x, s = l.y } else { var c = t.shape; n = c.x + c.width / 2, s = c.y + c.height / 2 } var f = t.matrix; r.push(t.matrix ? f.a * n + f.c * s + f.tx : n, t.matrix ? f.b * n + f.d * s + f.ty : s), o++, r.push(e[0], e[1]); for (var v = 2; v < e.length; v += 2) r.push(e[v], e[v + 1]), h.push(o++, a, o); h.push(a + 1, a, o) } }, w = { build: function(t) { var i = t.shape, n = i.x, s = i.y, e = i.width, r = i.height, h = t.points; h.length = 0, h.push(n, s, n + e, s, n + e, s + r, n, s + r) }, triangulate: function(t, i) { var n = t.points, s = i.points, e = s.length / 2; s.push(n[0], n[1], n[2], n[3], n[6], n[7], n[4], n[5]), i.indices.push(e, e + 1, e + 2, e + 1, e + 2, e + 3) } }; function g(t, i, n) { return t + (i - t) * n } function y(t, i, n, s, e, r, h) { void 0 === h && (h = []); for (var o = h, u = 0, a = 0, l = 0, c = 0, f = 0, v = 0, d = 0, _ = 0; d <= 20; ++d) u = g(t, n, _ = d / 20), a = g(i, s, _), l = g(n, e, _), c = g(s, r, _), f = g(u, l, _), v = g(a, c, _), 0 === d && o[o.length - 2] === f && o[o.length - 1] === v || o.push(f, v); return o } var E = { build: function(t) { if (G.nextRoundedRectBehavior) b.build(t); else { var i = t.shape, n = t.points, s = i.x, e = i.y, r = i.width, h = i.height, o = Math.max(0, Math.min(i.radius, Math.min(r, h) / 2)); n.length = 0, o ? (y(s, e + o, s, e, s + o, e, n), y(s + r - o, e, s + r, e, s + r, e + o, n), y(s + r, e + h - o, s + r, e + h, s + r - o, e + h, n), y(s + o, e + h, s, e + h, s, e + h - o, n)) : n.push(s, e, s + r, e, s + r, e + h, s, e + h) } }, triangulate: function(t, i) { if (G.nextRoundedRectBehavior) b.triangulate(t, i); else { for (var n = t.points, s = i.points, e = i.indices, r = s.length / 2, h = (0, a.earcut)(n, null, 2), o = 0, u = h.length; o < u; o += 3) e.push(h[o] + r), e.push(h[o + 1] + r), e.push(h[o + 2] + r); for (o = 0, u = n.length; o < u; o++) s.push(n[o], n[++o]) } } }; function S(t, i, n, s, e, r, h, o) { var u, a; h ? (u = s, a = -n) : (u = -s, a = n); var l = t + n * r + u, c = i + s * r + a; return o.push(t - n * e + u, i - s * e + a), o.push(l, c), 2 } function A(t, i, n, s, e, r, h, o) { var u = n - t, a = s - i, l = Math.atan2(u, a), c = Math.atan2(e - t, r - i); o && l < c ? l += 2 * Math.PI : !o && l > c && (c += 2 * Math.PI); var f = l, v = c - l, d = Math.abs(v), _ = Math.sqrt(u * u + a * a), p = 1 + (15 * d * Math.sqrt(_) / Math.PI >> 0), m = v / p; if (f += m, o) { h.push(t, i), h.push(n, s); for (var b = 1, w = f; b < p; b++, w += m) h.push(t, i), h.push(t + Math.sin(w) * _, i + Math.cos(w) * _); h.push(t, i), h.push(e, r) } else { h.push(n, s), h.push(t, i); for (b = 1, w = f; b < p; b++, w += m) h.push(t + Math.sin(w) * _, i + Math.cos(w) * _), h.push(t, i); h.push(e, r), h.push(t, i) } return 2 * p } function T(t, i) { t.lineStyle.native ? function(t, i) { var n = 0, s = t.shape, e = t.points || s.points, r = s.type !== u.HS.POLY || s.closeStroke; if (0 !== e.length) { var h = i.points, o = i.indices, a = e.length / 2, l = h.length / 2, c = l; for (h.push(e[0], e[1]), n = 1; n < a; n++) h.push(e[2 * n], e[2 * n + 1]), o.push(c, c + 1), c++; r && o.push(c, l) } }(t, i) : function(t, i) { var n = t.shape, e = t.points || n.points.slice(), h = i.closePointEps; if (0 !== e.length) { var o = t.lineStyle, a = new u.E9(e[0], e[1]), l = new u.E9(e[e.length - 2], e[e.length - 1]), c = n.type !== u.HS.POLY || n.closeStroke, v = Math.abs(a.x - l.x) < h && Math.abs(a.y - l.y) < h; if (c) { e = e.slice(), v && (e.pop(), e.pop(), l.set(e[e.length - 2], e[e.length - 1])); var d = .5 * (a.x + l.x), _ = .5 * (l.y + a.y); e.unshift(d, _), e.push(d, _) } var p = i.points, m = e.length / 2, b = e.length, w = p.length / 2, g = o.width / 2, y = g * g, E = o.miterLimit * o.miterLimit, T = e[0], M = e[1], O = e[2], I = e[3], N = 0, R = 0, P = -(M - I), x = T - O, L = 0, C = 0, U = Math.sqrt(P * P + x * x); P /= U, x /= U, P *= g, x *= g; var k = o.alignment, F = 2 * (1 - k), B = 2 * k; c || (o.cap === r.ROUND ? b += A(T - P * (F - B) * .5, M - x * (F - B) * .5, T - P * F, M - x * F, T + P * B, M + x * B, p, !0) + 2 : o.cap === r.SQUARE && (b += S(T, M, P, x, F, B, !0, p))), p.push(T - P * F, M - x * F), p.push(T + P * B, M + x * B); for (var D = 1; D < m - 1; ++D) { N = e[2 * (D + 1)], R = e[2 * (D + 1) + 1], P = -((M = e[2 * (D - 1) + 1]) - (I = e[2 * D + 1])), x = (T = e[2 * (D - 1)]) - (O = e[2 * D]), P /= U = Math.sqrt(P * P + x * x), x /= U, P *= g, x *= g, L = -(I - R), C = O - N, L /= U = Math.sqrt(L * L + C * C), C /= U, L *= g, C *= g; var j = O - T, G = M - I, W = O - N, H = R - I, X = G * W - H * j, V = X < 0; if (Math.abs(X) < .1) p.push(O - P * F, I - x * F), p.push(O + P * B, I + x * B); else { var $ = (-P + T) * (-x + I) - (-P + O) * (-x + M), Y = (-L + N) * (-C + I) - (-L + O) * (-C + R), z = (j * Y - W * $) / X, K = (H * $ - G * Y) / X, q = (z - O) * (z - O) + (K - I) * (K - I), Z = O + (z - O) * F, J = I + (K - I) * F, Q = O - (z - O) * B, tt = I - (K - I) * B, it = V ? F : B; q <= Math.min(j * j + G * G, W * W + H * H) + it * it * y ? o.join === s.BEVEL || q / y > E ? (V ? (p.push(Z, J), p.push(O + P * B, I + x * B), p.push(Z, J), p.push(O + L * B, I + C * B)) : (p.push(O - P * F, I - x * F), p.push(Q, tt), p.push(O - L * F, I - C * F), p.push(Q, tt)), b += 2) : o.join === s.ROUND ? V ? (p.push(Z, J), p.push(O + P * B, I + x * B), b += A(O, I, O + P * B, I + x * B, O + L * B, I + C * B, p, !0) + 4, p.push(Z, J), p.push(O + L * B, I + C * B)) : (p.push(O - P * F, I - x * F), p.push(Q, tt), b += A(O, I, O - P * F, I - x * F, O - L * F, I - C * F, p, !1) + 4, p.push(O - L * F, I - C * F), p.push(Q, tt)) : (p.push(Z, J), p.push(Q, tt)) : (p.push(O - P * F, I - x * F), p.push(O + P * B, I + x * B), o.join === s.BEVEL || q / y > E || (o.join === s.ROUND ? b += V ? A(O, I, O + P * B, I + x * B, O + L * B, I + C * B, p, !0) + 2 : A(O, I, O - P * F, I - x * F, O - L * F, I - C * F, p, !1) + 2 : (V ? (p.push(Q, tt), p.push(Q, tt)) : (p.push(Z, J), p.push(Z, J)), b += 2)), p.push(O - L * F, I - C * F), p.push(O + L * B, I + C * B), b += 2) } } P = -((M = e[2 * (m - 2) + 1]) - (I = e[2 * (m - 1) + 1])), x = (T = e[2 * (m - 2)]) - (O = e[2 * (m - 1)]), P /= U = Math.sqrt(P * P + x * x), x /= U, p.push(O - (P *= g) * F, I - (x *= g) * F), p.push(O + P * B, I + x * B), c || (o.cap === r.ROUND ? b += A(O - P * (F - B) * .5, I - x * (F - B) * .5, O - P * F, I - x * F, O + P * B, I + x * B, p, !1) + 2 : o.cap === r.SQUARE && (b += S(O, I, P, x, F, B, !1, p))); var nt = i.indices, st = f.epsilon * f.epsilon; for (D = w; D < b + w - 2; ++D) T = p[2 * D], M = p[2 * D + 1], O = p[2 * (D + 1)], I = p[2 * (D + 1) + 1], N = p[2 * (D + 2)], R = p[2 * (D + 2) + 1], Math.abs(T * (I - R) + O * (R - M) + N * (M - I)) < st || nt.push(D, D + 1, D + 2) } }(t, i) } var M, O = function() { function t() {} return t.curveTo = function(t, i, n, s, e, r) { var h = r[r.length - 1] - i, o = r[r.length - 2] - t, u = s - i, a = n - t, l = Math.abs(h * a - o * u); if (l < 1e-8 || 0 === e) return r[r.length - 2] === t && r[r.length - 1] === i || r.push(t, i), null; var c = h * h + o * o, f = u * u + a * a, v = h * u + o * a, d = e * Math.sqrt(c) / l, _ = e * Math.sqrt(f) / l, p = d * v / c, m = _ * v / f, b = d * a + _ * o, w = d * u + _ * h, g = a * (d + m), y = u * (d + m); return { cx: b + t, cy: w + i, radius: e, startAngle: Math.atan2(h * (_ + p) - w, o * (_ + p) - b), endAngle: Math.atan2(y - w, g - b), anticlockwise: o * u > a * h } }, t.arc = function(t, i, n, s, e, r, h, o, a) { for (var l = h - r, c = f.Qi(Math.abs(l) * e, 40 * Math.ceil(Math.abs(l) / u.tn)), v = l / (2 * c), d = 2 * v, _ = Math.cos(v), p = Math.sin(v), m = c - 1, b = m % 1 / m, w = 0; w <= m; ++w) { var g = v + r + d * (w + b * w), y = Math.cos(g), E = -Math.sin(g); a.push((_ * y + p * E) * e + n, (_ * -E + p * y) * e + s) } }, t }(), I = function() { function t() {} return t.curveLength = function(t, i, n, s, e, r, h, o) { for (var u = 0, a = 0, l = 0, c = 0, f = 0, v = 0, d = 0, _ = 0, p = 0, m = 0, b = 0, w = t, g = i, y = 1; y <= 10; ++y) m = w - (_ = (d = (v = (f = 1 - (a = y / 10)) * f) * f) * t + 3 * v * a * n + 3 * f * (l = a * a) * e + (c = l * a) * h), b = g - (p = d * i + 3 * v * a * s + 3 * f * l * r + c * o), w = _, g = p, u += Math.sqrt(m * m + b * b); return u }, t.curveTo = function(i, n, s, e, r, h, o) { var u = o[o.length - 2], a = o[o.length - 1]; o.length -= 2; var l = f.Qi(t.curveLength(u, a, i, n, s, e, r, h)), c = 0, v = 0, d = 0, _ = 0, p = 0; o.push(u, a); for (var m = 1, b = 0; m <= l; ++m) o.push((d = (v = (c = 1 - (b = m / l)) * c) * c) * u + 3 * v * b * i + 3 * c * (_ = b * b) * s + (p = _ * b) * r, d * a + 3 * v * b * n + 3 * c * _ * e + p * h) }, t }(), N = function() { function t() {} return t.curveLength = function(t, i, n, s, e, r) { var h = t - 2 * n + e, o = i - 2 * s + r, u = 2 * n - 2 * t, a = 2 * s - 2 * i, l = 4 * (h * h + o * o), c = 4 * (h * u + o * a), f = u * u + a * a, v = 2 * Math.sqrt(l + c + f), d = Math.sqrt(l), _ = 2 * l * d, p = 2 * Math.sqrt(f), m = c / d; return (_ * v + d * c * (v - p) + (4 * f * l - c * c) * Math.log((2 * d + m + v) / (m + p))) / (4 * _) }, t.curveTo = function(i, n, s, e, r) { for (var h = r[r.length - 2], o = r[r.length - 1], u = f.Qi(t.curveLength(h, o, i, n, s, e)), a = 0, l = 0, c = 1; c <= u; ++c) { var v = c / u; r.push((a = h + (i - h) * v) + (i + (s - i) * v - a) * v, (l = o + (n - o) * v) + (n + (e - n) * v - l) * v) } }, t }(), R = function() { function t() { this.reset() } return t.prototype.begin = function(t, i, n) { this.reset(), this.style = t, this.start = i, this.attribStart = n }, t.prototype.end = function(t, i) { this.attribSize = i - this.attribStart, this.size = t - this.start }, t.prototype.reset = function() { this.style = null, this.size = 0, this.start = 0, this.attribStart = 0, this.attribSize = 0 }, t }(), P = ((M = {})[u.HS.POLY] = m, M[u.HS.CIRC] = b, M[u.HS.ELIP] = b, M[u.HS.RECT] = w, M[u.HS.RREC] = E, M), x = [], L = [], C = function() { function t(t, i, n, s) { void 0 === i && (i = null), void 0 === n && (n = null), void 0 === s && (s = null), this.points = [], this.holes = [], this.shape = t, this.lineStyle = n, this.fillStyle = i, this.matrix = s, this.type = t.type } return t.prototype.clone = function() { return new t(this.shape, this.fillStyle, this.lineStyle, this.matrix) }, t.prototype.destroy = function() { this.shape = null, this.holes.length = 0, this.holes = null, this.points.length = 0, this.points = null, this.lineStyle = null, this.fillStyle = null }, t }(), U = new u.E9, k = new c.YZ, F = function(t) { function i() { var i = t.call(this) || this; return i.closePointEps = 1e-4, i.boundsPadding = 0, i.uvsFloat32 = null, i.indicesUint16 = null, i.batchable = !1, i.points = [], i.colors = [], i.uvs = [], i.indices = [], i.textureIds = [], i.graphicsData = [], i.drawCalls = [], i.batchDirty = -1, i.batches = [], i.dirty = 0, i.cacheDirty = -1, i.clearDirty = 0, i.shapeIndex = 0, i.ki = new c.YZ, i.boundsDirty = -1, i } return _(i, t), Object.defineProperty(i.prototype, "bounds", { get: function() { return this.boundsDirty !== this.dirty && (this.boundsDirty = this.dirty, this.calculateBounds()), this.ki }, enumerable: !1, configurable: !0 }), i.prototype.invalidate = function() { this.boundsDirty = -1, this.dirty++, this.batchDirty++, this.shapeIndex = 0, this.points.length = 0, this.colors.length = 0, this.uvs.length = 0, this.indices.length = 0, this.textureIds.length = 0; for (var t = 0; t < this.drawCalls.length; t++) this.drawCalls[t].texArray.clear(), L.push(this.drawCalls[t]); this.drawCalls.length = 0; for (t = 0; t < this.batches.length; t++) { var i = this.batches[t]; i.reset(), x.push(i) } this.batches.length = 0 }, i.prototype.clear = function() { return this.graphicsData.length > 0 && (this.invalidate(), this.clearDirty++, this.graphicsData.length = 0), this }, i.prototype.drawShape = function(t, i, n, s) { void 0 === i && (i = null), void 0 === n && (n = null), void 0 === s && (s = null); var e = new C(t, i, n, s); return this.graphicsData.push(e), this.dirty++, this }, i.prototype.drawHole = function(t, i) { if (void 0 === i && (i = null), !this.graphicsData.length) return null; var n = new C(t, null, null, i), s = this.graphicsData[this.graphicsData.length - 1]; return n.lineStyle = s.lineStyle, s.holes.push(n), this.dirty++, this }, i.prototype.destroy = function() { t.prototype.destroy.call(this); for (var i = 0; i < this.graphicsData.length; ++i) this.graphicsData[i].destroy(); this.points.length = 0, this.points = null, this.colors.length = 0, this.colors = null, this.uvs.length = 0, this.uvs = null, this.indices.length = 0, this.indices = null, this.indexBuffer.destroy(), this.indexBuffer = null, this.graphicsData.length = 0, this.graphicsData = null, this.drawCalls.length = 0, this.drawCalls = null, this.batches.length = 0, this.batches = null, this.ki = null }, i.prototype.containsPoint = function(t) { for (var i = this.graphicsData, n = 0; n < i.length; ++n) { var s = i[n]; if (s.fillStyle.visible && (s.shape && (s.matrix ? s.matrix.applyInverse(t, U) : U.copyFrom(t), s.shape.contains(U.x, U.y)))) { var e = !1; if (s.holes) for (var r = 0; r < s.holes.length; r++) { if (s.holes[r].shape.contains(U.x, U.y)) { e = !0; break } } if (!e) return !0 } } return !1 }, i.prototype.updateBatches = function(t) { if (this.graphicsData.length) { if (this.validateBatching()) { this.cacheDirty = this.dirty; var i = this.uvs, n = this.graphicsData, s = null, e = null; this.batches.length > 0 && (e = (s = this.batches[this.batches.length - 1]).style); for (var r = this.shapeIndex; r < n.length; r++) { this.shapeIndex++; var h = n[r], o = h.fillStyle, u = h.lineStyle; P[h.type].build(h), h.matrix && this.transformPoints(h.points, h.matrix), (o.visible || u.visible) && this.processHoles(h.holes); for (var a = 0; a < 2; a++) { var c = 0 === a ? o : u; if (c.visible) { var f = this.indices.length, v = this.points.length / 2; c.texture.baseTexture.wrapMode = l.Nt.REPEAT, 0 === a ? this.processFill(h) : this.processLine(h); var d = this.points.length / 2 - v; 0 !== d && (s && !this.nn(e, c) && (s.end(f, v), s = null), s || ((s = x.pop() || new R).begin(c, f, v), this.batches.push(s), e = c), this.addUvs(this.points, i, c.texture, v, d, c.matrix)) } } } var _ = this.points.length / 2; if (s && s.end(this.indices.length, _), 0 !== this.batches.length) { if (this.indicesUint16 && this.indices.length === this.indicesUint16.length) this.indicesUint16.set(this.indices); else this.indicesUint16 = _ > 65535 && t ? new Uint32Array(this.indices) : new Uint16Array(this.indices); this.batchable = this.isBatchable(), this.batchable ? this.packBatches() : this.buildDrawCalls() } else this.batchable = !0 } } else this.batchable = !0 }, i.prototype.nn = function(t, i) { return !(!t || !i) && (t.texture.baseTexture === i.texture.baseTexture && (t.color + t.alpha === i.color + i.alpha && !!t.native == !!i.native)) }, i.prototype.validateBatching = function() { if (this.dirty === this.cacheDirty || !this.graphicsData.length) return !1; for (var t = 0, i = this.graphicsData.length; t < i; t++) { var n = this.graphicsData[t], s = n.fillStyle, e = n.lineStyle; if (s && !s.texture.baseTexture.valid) return !1; if (e && !e.texture.baseTexture.valid) return !1 } return !0 }, i.prototype.packBatches = function() { this.batchDirty++, this.uvsFloat32 = new Float32Array(this.uvs); for (var t = this.batches, i = 0, n = t.length; i < n; i++) for (var s = t[i], e = 0; e < s.size; e++) { var r = s.start + e; this.indicesUint16[r] = this.indicesUint16[r] - s.attribStart } }, i.prototype.isBatchable = function() { if (this.points.length > 131070) return !1; for (var t = this.batches, n = 0; n < t.length; n++) if (t[n].style.native) return !1; return this.points.length < 2 * i.BATCHABLE_SIZE }, i.prototype.buildDrawCalls = function() { for (var t = ++o.VL.ut, i = 0; i < this.drawCalls.length; i++) this.drawCalls[i].texArray.clear(), L.push(this.drawCalls[i]); this.drawCalls.length = 0; var n = this.colors, s = this.textureIds, e = L.pop(); e || ((e = new o.a$).texArray = new o.Ie), e.texArray.count = 0, e.start = 0, e.size = 0, e.type = l.lg.TRIANGLES; var r = 0, h = null, u = 0, a = !1, c = l.lg.TRIANGLES, f = 0; this.drawCalls.push(e); for (i = 0; i < this.batches.length; i++) { var v = this.batches[i], d = v.style, _ = d.texture.baseTexture; a !== !!d.native && (c = (a = !!d.native) ? l.lg.LINES : l.lg.TRIANGLES, h = null, r = 8, t++), h !== _ && (h = _, _.rt !== t && (8 === r && (t++, r = 0, e.size > 0 && ((e = L.pop()) || ((e = new o.a$).texArray = new o.Ie), this.drawCalls.push(e)), e.start = f, e.size = 0, e.texArray.count = 0, e.type = c), _.touched = 1, _.rt = t, _.ht = r, _.wrapMode = l.Nt.REPEAT, e.texArray.elements[e.texArray.count++] = _, r++)), e.size += v.size, f += v.size, u = _.ht, this.addColors(n, d.color, d.alpha, v.attribSize, v.attribStart), this.addTextureIds(s, u, v.attribSize, v.attribStart) } o.VL.ut = t, this.packAttributes() }, i.prototype.packAttributes = function() { for (var t = this.points, i = this.uvs, n = this.colors, s = this.textureIds, e = new ArrayBuffer(3 * t.length * 4), r = new Float32Array(e), h = new Uint32Array(e), o = 0, u = 0; u < t.length / 2; u++) r[o++] = t[2 * u], r[o++] = t[2 * u + 1], r[o++] = i[2 * u], r[o++] = i[2 * u + 1], h[o++] = n[u], r[o++] = s[u]; this.Pi.update(e), this.Oi.update(this.indicesUint16) }, i.prototype.processFill = function(t) { t.holes.length ? m.triangulate(t, this) : P[t.type].triangulate(t, this) }, i.prototype.processLine = function(t) { T(t, this); for (var i = 0; i < t.holes.length; i++) T(t.holes[i], this) }, i.prototype.processHoles = function(t) { for (var i = 0; i < t.length; i++) { var n = t[i]; P[n.type].build(n), n.matrix && this.transformPoints(n.points, n.matrix) } }, i.prototype.calculateBounds = function() { var t = this.ki, i = k, n = u.y3.IDENTITY; this.ki.clear(), i.clear(); for (var s = 0; s < this.graphicsData.length; s++) { var e = this.graphicsData[s], r = e.shape, h = e.type, o = e.lineStyle, a = e.matrix || u.y3.IDENTITY, l = 0; if (o && o.visible && (l = o.width, l *= h !== u.HS.POLY || e.fillStyle.visible ? Math.max(0, o.alignment) : Math.max(o.alignment, 1 - o.alignment)), n !== a && (i.isEmpty() || (t.addBoundsMatrix(i, n), i.clear()), n = a), h === u.HS.RECT || h === u.HS.RREC) { i.addFramePad(r.x, r.y, r.x + r.width, r.y + r.height, l, l) } else if (h === u.HS.CIRC) { i.addFramePad(r.x, r.y, r.x, r.y, r.radius + l, r.radius + l) } else if (h === u.HS.ELIP) { i.addFramePad(r.x, r.y, r.x, r.y, r.width + l, r.height + l) } else { t.addVerticesMatrix(n, r.points, 0, r.points.length, l, l) } } i.isEmpty() || t.addBoundsMatrix(i, n), t.pad(this.boundsPadding, this.boundsPadding) }, i.prototype.transformPoints = function(t, i) { for (var n = 0; n < t.length / 2; n++) { var s = t[2 * n], e = t[2 * n + 1]; t[2 * n] = i.a * s + i.c * e + i.tx, t[2 * n + 1] = i.b * s + i.d * e + i.ty } }, i.prototype.addColors = function(t, i, n, s, e) { void 0 === e && (e = 0); var r = (0, a.premultiplyTint)((i >> 16) + (65280 & i) + ((255 & i) << 16), n); t.length = Math.max(t.length, e + s); for (var h = 0; h < s; h++) t[e + h] = r }, i.prototype.addTextureIds = function(t, i, n, s) { void 0 === s && (s = 0), t.length = Math.max(t.length, s + n); for (var e = 0; e < n; e++) t[s + e] = i }, i.prototype.addUvs = function(t, i, n, s, e, r) { void 0 === r && (r = null); for (var h = 0, o = i.length, u = n.frame; h < e;) { var a = t[2 * (s + h)], l = t[2 * (s + h) + 1]; if (r) { var c = r.a * a + r.c * l + r.tx; l = r.b * a + r.d * l + r.ty, a = c } h++, i.push(a / u.width, l / u.height) } var f = n.baseTexture; (u.width < f.width || u.height < f.height) && this.adjustUvs(i, n, o, e) }, i.prototype.adjustUvs = function(t, i, n, s) { for (var e = i.baseTexture, r = 1e-6, h = n + 2 * s, o = i.frame, u = o.width / e.width, a = o.height / e.height, l = o.x / o.width, c = o.y / o.height, f = Math.floor(t[n] + r), v = Math.floor(t[n + 1] + r), d = n + 2; d < h; d += 2) f = Math.min(f, Math.floor(t[d] + r)), v = Math.min(v, Math.floor(t[d + 1] + r)); l -= f, c -= v; for (d = n; d < h; d += 2) t[d] = (t[d] + l) * u, t[d + 1] = (t[d + 1] + c) * a }, i.BATCHABLE_SIZE = 100, i }(o.JZ), B = function(t) { function i() { var i = null !== t && t.apply(this, arguments) || this; return i.width = 0, i.alignment = .5, i.native = !1, i.cap = r.BUTT, i.join = s.MITER, i.miterLimit = 10, i } return _(i, t), i.prototype.clone = function() { var t = new i; return t.color = this.color, t.alpha = this.alpha, t.texture = this.texture, t.matrix = this.matrix, t.visible = this.visible, t.width = this.width, t.alignment = this.alignment, t.native = this.native, t.cap = this.cap, t.join = this.join, t.miterLimit = this.miterLimit, t }, i.prototype.reset = function() { t.prototype.reset.call(this), this.color = 0, this.alignment = .5, this.width = 0, this.native = !1 }, i }(v), D = new Float32Array(3), j = {}, G = function(t) { function i(i) { void 0 === i && (i = null); var n = t.call(this) || this; return n.shader = null, n.pluginName = "batch", n.currentPath = null, n.batches = [], n.batchTint = -1, n.batchDirty = -1, n.vertexData = null, n.sn = new v, n.en = new B, n.rn = null, n.hn = !1, n.state = o.ZM.for2d(), n.un = i || new F, n.un.refCount++, n.an = -1, n.tint = 16777215, n.blendMode = l.T$.NORMAL, n } return _(i, t), Object.defineProperty(i.prototype, "geometry", { get: function() { return this.un }, enumerable: !1, configurable: !0 }), i.prototype.clone = function() { return this.finishPoly(), new i(this.un) }, Object.defineProperty(i.prototype, "blendMode", { get: function() { return this.state.blendMode }, set: function(t) { this.state.blendMode = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "tint", { get: function() { return this.ln }, set: function(t) { this.ln = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "fill", { get: function() { return this.sn }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "line", { get: function() { return this.en }, enumerable: !1, configurable: !0 }), i.prototype.lineStyle = function(t, i, n, s, e) { return void 0 === t && (t = null), void 0 === i && (i = 0), void 0 === n && (n = 1), void 0 === s && (s = .5), void 0 === e && (e = !1), "number" == typeof t && (t = { width: t, color: i, alpha: n, alignment: s, native: e }), this.lineTextureStyle(t) }, i.prototype.lineTextureStyle = function(t) { t = Object.assign({ width: 0, texture: o.xE.WHITE, color: t && t.texture ? 16777215 : 0, alpha: 1, matrix: null, alignment: .5, native: !1, cap: r.BUTT, join: s.MITER, miterLimit: 10 }, t), this.currentPath && this.startPoly(); var i = t.width > 0 && t.alpha > 0; return i ? (t.matrix && (t.matrix = t.matrix.clone(), t.matrix.invert()), Object.assign(this.en, { visible: i }, t)) : this.en.reset(), this }, i.prototype.startPoly = function() { if (this.currentPath) { var t = this.currentPath.points, i = this.currentPath.points.length; i > 2 && (this.drawShape(this.currentPath), this.currentPath = new u.mg, this.currentPath.closeStroke = !1, this.currentPath.points.push(t[i - 2], t[i - 1])) } else this.currentPath = new u.mg, this.currentPath.closeStroke = !1 }, i.prototype.finishPoly = function() { this.currentPath && (this.currentPath.points.length > 2 ? (this.drawShape(this.currentPath), this.currentPath = null) : this.currentPath.points.length = 0) }, i.prototype.moveTo = function(t, i) { return this.startPoly(), this.currentPath.points[0] = t, this.currentPath.points[1] = i, this }, i.prototype.lineTo = function(t, i) { this.currentPath || this.moveTo(0, 0); var n = this.currentPath.points; return n[n.length - 2] === t && n[n.length - 1] === i || n.push(t, i), this }, i.prototype.cn = function(t, i) { void 0 === t && (t = 0), void 0 === i && (i = 0), this.currentPath ? 0 === this.currentPath.points.length && (this.currentPath.points = [t, i]) : this.moveTo(t, i) }, i.prototype.quadraticCurveTo = function(t, i, n, s) { this.cn(); var e = this.currentPath.points; return 0 === e.length && this.moveTo(0, 0), N.curveTo(t, i, n, s, e), this }, i.prototype.bezierCurveTo = function(t, i, n, s, e, r) { return this.cn(), I.curveTo(t, i, n, s, e, r, this.currentPath.points), this }, i.prototype.arcTo = function(t, i, n, s, e) { this.cn(t, i); var r = O.curveTo(t, i, n, s, e, this.currentPath.points); r && this.arc(r.cx, r.cy, r.radius, r.startAngle, r.endAngle, r.anticlockwise); return this }, i.prototype.arc = function(t, i, n, s, e, r) { if (void 0 === r && (r = !1), s === e) return this; if (!r && e <= s ? e += u.tn : r && s <= e && (s += u.tn), 0 === e - s) return this; var h = t + Math.cos(s) * n, o = i + Math.sin(s) * n, a = this.un.closePointEps, l = this.currentPath ? this.currentPath.points : null; if (l) { var c = Math.abs(l[l.length - 2] - h), f = Math.abs(l[l.length - 1] - o); c < a && f < a || l.push(h, o) } else this.moveTo(h, o), l = this.currentPath.points; return O.arc(h, o, t, i, n, s, e, r, l), this }, i.prototype.beginFill = function(t, i) { return void 0 === t && (t = 0), void 0 === i && (i = 1), this.beginTextureFill({ texture: o.xE.WHITE, color: t, alpha: i }) }, i.prototype.beginTextureFill = function(t) { t = Object.assign({ texture: o.xE.WHITE, color: 16777215, alpha: 1, matrix: null }, t), this.currentPath && this.startPoly(); var i = t.alpha > 0; return i ? (t.matrix && (t.matrix = t.matrix.clone(), t.matrix.invert()), Object.assign(this.sn, { visible: i }, t)) : this.sn.reset(), this }, i.prototype.endFill = function() { return this.finishPoly(), this.sn.reset(), this }, i.prototype.drawRect = function(t, i, n, s) { return this.drawShape(new u.Ae(t, i, n, s)) }, i.prototype.drawRoundedRect = function(t, i, n, s, e) { return this.drawShape(new u.c9(t, i, n, s, e)) }, i.prototype.drawCircle = function(t, i, n) { return this.drawShape(new u.Cd(t, i, n)) }, i.prototype.drawEllipse = function(t, i, n, s) { return this.drawShape(new u.Pj(t, i, n, s)) }, i.prototype.drawPolygon = function() { for (var t, i = arguments, n = [], s = 0; s < arguments.length; s++) n[s] = i[s]; var e = !0, r = n[0]; r.points ? (e = r.closeStroke, t = r.points) : t = Array.isArray(n[0]) ? n[0] : n; var h = new u.mg(t); return h.closeStroke = e, this.drawShape(h), this }, i.prototype.drawShape = function(t) { return this.hn ? this.un.drawHole(t, this.rn) : this.un.drawShape(t, this.sn.clone(), this.en.clone(), this.rn), this }, i.prototype.clear = function() { return this.un.clear(), this.en.reset(), this.sn.reset(), this.Bi++, this.rn = null, this.hn = !1, this.currentPath = null, this }, i.prototype.isFastRect = function() { var t = this.un.graphicsData; return !(1 !== t.length || t[0].shape.type !== u.HS.RECT || t[0].matrix || t[0].holes.length || t[0].lineStyle.visible && t[0].lineStyle.width) }, i.prototype.Ki = function(t) { this.finishPoly(); var i = this.un; i.updateBatches(t.context.supports.uint32Indices), i.batchable ? (this.batchDirty !== i.batchDirty && this.vn(), this.dn(t)) : (t.batch.flush(), this._n(t)) }, i.prototype.vn = function() { var t = this.un, i = this.blendMode, n = t.batches.length; this.batchTint = -1, this.an = -1, this.batchDirty = t.batchDirty, this.batches.length = n, this.vertexData = new Float32Array(t.points); for (var s = 0; s < n; s++) { var e = t.batches[s], r = e.style.color, h = new Float32Array(this.vertexData.buffer, 4 * e.attribStart * 2, 2 * e.attribSize), o = new Float32Array(t.uvsFloat32.buffer, 4 * e.attribStart * 2, 2 * e.attribSize), u = { vertexData: h, blendMode: i, indices: new Uint16Array(t.indicesUint16.buffer, 2 * e.start, e.size), uvs: o, mn: (0, a.hex2rgb)(r), xi: r, Ft: e.style.texture, alpha: e.style.alpha, worldAlpha: 1 }; this.batches[s] = u } }, i.prototype.dn = function(t) { if (this.batches.length) { t.batch.setObjectRenderer(t.plugins[this.pluginName]), this.calculateVertices(), this.calculateTints(); for (var i = 0, n = this.batches.length; i < n; i++) { var s = this.batches[i]; s.worldAlpha = this.worldAlpha * s.alpha, t.plugins[this.pluginName].render(s) } } }, i.prototype._n = function(t) { var i = this.bn(t), n = this.un, s = this.tint, e = this.worldAlpha, r = i.uniforms, h = n.drawCalls; r.translationMatrix = this.transform.worldTransform, r.tint[0] = (s >> 16 & 255) / 255 * e, r.tint[1] = (s >> 8 & 255) / 255 * e, r.tint[2] = (255 & s) / 255 * e, r.tint[3] = e, t.shader.bind(i), t.geometry.bind(n, i), t.state.set(this.state); for (var o = 0, u = h.length; o < u; o++) this.gn(t, n.drawCalls[o]) }, i.prototype.gn = function(t, i) { for (var n = i.texArray, s = i.type, e = i.size, r = i.start, h = n.count, o = 0; o < h; o++) t.texture.bind(n.elements[o], o); t.geometry.draw(s, e, r) }, i.prototype.bn = function(t) { var i = this.shader, n = this.pluginName; if (!i) { if (!j[n]) { for (var s = t.plugins[n].MAX_TEXTURES, e = new Int32Array(s), r = 0; r < s; r++) e[r] = r; var h = { tint: new Float32Array([1, 1, 1, 1]), translationMatrix: new u.y3, default: o.oo.from({ uSamplers: e }, !0) }; j[n] = new o.ex(t.plugins[n].mi.program, h) } i = j[n] } return i }, i.prototype.$i = function() { this.finishPoly(); var t = this.un; if (t.graphicsData.length) { var i = t.bounds; this.ki.addFrame(this.transform, i.minX, i.minY, i.maxX, i.maxY) } }, i.prototype.containsPoint = function(t) { return this.worldTransform.applyInverse(t, i.yn), this.un.containsPoint(i.yn) }, i.prototype.calculateTints = function() { if (this.batchTint !== this.tint) { this.batchTint = this.tint; for (var t = (0, a.hex2rgb)(this.tint, D), i = 0; i < this.batches.length; i++) { var n = this.batches[i], s = n.mn, e = (t[0] * s[0] * 255 << 16) + (t[1] * s[1] * 255 << 8) + (0 | t[2] * s[2] * 255); n.xi = (e >> 16) + (65280 & e) + ((255 & e) << 16) } } }, i.prototype.calculateVertices = function() { var t = this.transform.L; if (this.an !== t) { this.an = t; for (var i = this.transform.worldTransform, n = i.a, s = i.b, e = i.c, r = i.d, h = i.tx, o = i.ty, u = this.un.points, a = this.vertexData, l = 0, c = 0; c < u.length; c += 2) { var f = u[c], v = u[c + 1]; a[l++] = n * f + e * v + h, a[l++] = r * v + s * f + o } } }, i.prototype.closePath = function() { var t = this.currentPath; return t && (t.closeStroke = !0, this.finishPoly()), this }, i.prototype.setMatrix = function(t) { return this.rn = t, this }, i.prototype.beginHole = function() { return this.finishPoly(), this.hn = !0, this }, i.prototype.endHole = function() { return this.finishPoly(), this.hn = !1, this }, i.prototype.destroy = function(i) { this.un.refCount--, 0 === this.un.refCount && this.un.dispose(), this.rn = null, this.currentPath = null, this.en.destroy(), this.en = null, this.sn.destroy(), this.sn = null, this.un = null, this.shader = null, this.vertexData = null, this.batches.length = 0, this.batches = null, t.prototype.destroy.call(this, i) }, i.nextRoundedRectBehavior = !1, i.yn = new u.E9, i }(c.W2) }, 8971: (t, i, n) => { "use strict"; n.d(i, { bx: () => v }); var s = n(229), e = n(8759), r = n(6480), h = n(6335), o = function() { function t() { this.pressure = 0, this.rotationAngle = 0, this.twist = 0, this.tangentialPressure = 0, this.global = new s.E9, this.target = null, this.originalEvent = null, this.identifier = null, this.isPrimary = !1, this.button = 0, this.buttons = 0, this.width = 0, this.height = 0, this.tiltX = 0, this.tiltY = 0, this.pointerType = null, this.pressure = 0, this.rotationAngle = 0, this.twist = 0, this.tangentialPressure = 0 } return Object.defineProperty(t.prototype, "pointerId", { get: function() { return this.identifier }, enumerable: !1, configurable: !0 }), t.prototype.getLocalPosition = function(t, i, n) { return t.worldTransform.applyInverse(n || this.global, i) }, t.prototype.copyEvent = function(t) { "isPrimary" in t && t.isPrimary && (this.isPrimary = !0), this.button = "button" in t && t.button; var i = "buttons" in t && t.buttons; this.buttons = Number.isInteger(i) ? i : "which" in t && t.which, this.width = "width" in t && t.width, this.height = "height" in t && t.height, this.tiltX = "tiltX" in t && t.tiltX, this.tiltY = "tiltY" in t && t.tiltY, this.pointerType = "pointerType" in t && t.pointerType, this.pressure = "pressure" in t && t.pressure, this.rotationAngle = "rotationAngle" in t && t.rotationAngle, this.twist = "twist" in t && t.twist || 0, this.tangentialPressure = "tangentialPressure" in t && t.tangentialPressure || 0 }, t.prototype.reset = function() { this.isPrimary = !1 }, t }(), u = function(t, i) { return (u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]) })(t, i) }; var a = function() { function t() { this.stopped = !1, this.stopsPropagatingAt = null, this.stopPropagationHint = !1, this.target = null, this.currentTarget = null, this.type = null, this.data = null } return t.prototype.stopPropagation = function() { this.stopped = !0, this.stopPropagationHint = !0, this.stopsPropagatingAt = this.currentTarget }, t.prototype.reset = function() { this.stopped = !1, this.stopsPropagatingAt = null, this.stopPropagationHint = !1, this.currentTarget = null, this.target = null }, t }(), l = function() { function t(i) { this.En = i, this.Sn = t.FLAGS.NONE } return t.prototype.An = function(t, i) { this.Sn = i ? this.Sn | t : this.Sn & ~t }, Object.defineProperty(t.prototype, "pointerId", { get: function() { return this.En }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "flags", { get: function() { return this.Sn }, set: function(t) { this.Sn = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "none", { get: function() { return this.Sn === t.FLAGS.NONE }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "over", { get: function() { return 0 != (this.Sn & t.FLAGS.OVER) }, set: function(i) { this.An(t.FLAGS.OVER, i) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "rightDown", { get: function() { return 0 != (this.Sn & t.FLAGS.RIGHT_DOWN) }, set: function(i) { this.An(t.FLAGS.RIGHT_DOWN, i) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "leftDown", { get: function() { return 0 != (this.Sn & t.FLAGS.LEFT_DOWN) }, set: function(i) { this.An(t.FLAGS.LEFT_DOWN, i) }, enumerable: !1, configurable: !0 }), t.FLAGS = Object.freeze({ NONE: 0, OVER: 1, LEFT_DOWN: 2, RIGHT_DOWN: 4 }), t }(), c = function() { function t() { this.Tn = new s.E9 } return t.prototype.recursiveFindHit = function(t, i, n, s, e) { if (!i || !i.visible) return !1; var r = t.data.global, h = !1, o = e = i.interactive || e, u = !0; if (i.hitArea ? (s && (i.worldTransform.applyInverse(r, this.Tn), i.hitArea.contains(this.Tn.x, this.Tn.y) ? h = !0 : (s = !1, u = !1)), o = !1) : i.Gi && s && (i.Gi.containsPoint && i.Gi.containsPoint(r) || (s = !1)), u && i.interactiveChildren && i.children) for (var a = i.children, l = a.length - 1; l >= 0; l--) { var c = a[l], f = this.recursiveFindHit(t, c, n, s, o); if (f) { if (!c.parent) continue; o = !1, f && (t.target && (s = !1), h = !0) } } return e && (s && !t.target && !i.hitArea && i.containsPoint && i.containsPoint(r) && (h = !0), i.interactive && (h && !t.target && (t.target = i), n && n(t, i, !!h))), h }, t.prototype.findHit = function(t, i, n, s) { this.recursiveFindHit(t, i, n, s, !1) }, t }(); r.s$.mixin({ interactive: !1, interactiveChildren: !0, hitArea: null, get buttonMode() { return "pointer" === this.cursor }, set buttonMode(t) { t ? this.cursor = "pointer" : "pointer" === this.cursor && (this.cursor = null) }, cursor: null, get trackedPointers() { return void 0 === this.Mn && (this.Mn = {}), this.Mn }, Mn: void 0 }); var f = { target: null, data: { global: null } }, v = function(t) { function i(i, n) { var s = t.call(this) || this; return n = n || {}, s.renderer = i, s.autoPreventDefault = void 0 === n.autoPreventDefault || n.autoPreventDefault, s.interactionFrequency = n.interactionFrequency || 10, s.mouse = new o, s.mouse.identifier = 1, s.mouse.global.set(-999999), s.activeInteractionData = {}, s.activeInteractionData[1] = s.mouse, s.interactionDataPool = [], s.eventData = new a, s.interactionDOMElement = null, s.moveWhenInside = !1, s.eventsAdded = !1, s.tickerAdded = !1, s.mouseOverRenderer = !("PointerEvent" in globalThis), s.supportsTouchEvents = "ontouchstart" in globalThis, s.supportsPointerEvents = !!globalThis.PointerEvent, s.onPointerUp = s.onPointerUp.bind(s), s.processPointerUp = s.processPointerUp.bind(s), s.onPointerCancel = s.onPointerCancel.bind(s), s.processPointerCancel = s.processPointerCancel.bind(s), s.onPointerDown = s.onPointerDown.bind(s), s.processPointerDown = s.processPointerDown.bind(s), s.onPointerMove = s.onPointerMove.bind(s), s.processPointerMove = s.processPointerMove.bind(s), s.onPointerOut = s.onPointerOut.bind(s), s.processPointerOverOut = s.processPointerOverOut.bind(s), s.onPointerOver = s.onPointerOver.bind(s), s.cursorStyles = { default: "inherit", pointer: "pointer" }, s.currentCursorMode = null, s.cursor = null, s.resolution = 1, s.delayedEvents = [], s.search = new c, s.On = new r.Ql, s.Nn = { capture: !0, passive: !1 }, s.Rn = void 0 === n.useSystemTicker || n.useSystemTicker, s.setTargetElement(s.renderer.view, s.renderer.resolution), s } return function(t, i) { function n() { this.constructor = t } u(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) }(i, t), Object.defineProperty(i.prototype, "useSystemTicker", { get: function() { return this.Rn }, set: function(t) { this.Rn = t, t ? this.addTickerListener() : this.removeTickerListener() }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "lastObjectRendered", { get: function() { return this.renderer.ei || this.On }, enumerable: !1, configurable: !0 }), i.prototype.hitTest = function(t, i) { return f.target = null, f.data.global = t, i || (i = this.lastObjectRendered), this.processInteractive(f, i, null, !0), f.target }, i.prototype.setTargetElement = function(t, i) { void 0 === i && (i = 1), this.removeTickerListener(), this.removeEvents(), this.interactionDOMElement = t, this.resolution = i, this.addEvents(), this.addTickerListener() }, i.prototype.addTickerListener = function() { !this.tickerAdded && this.interactionDOMElement && this.Rn && (e.vB.system.add(this.tickerUpdate, this, e.uF.INTERACTION), this.tickerAdded = !0) }, i.prototype.removeTickerListener = function() { this.tickerAdded && (e.vB.system.remove(this.tickerUpdate, this), this.tickerAdded = !1) }, i.prototype.addEvents = function() { if (!this.eventsAdded && this.interactionDOMElement) { var t = this.interactionDOMElement.style; globalThis.navigator.msPointerEnabled ? (t.msContentZooming = "none", t.msTouchAction = "none") : this.supportsPointerEvents && (t.touchAction = "none"), this.supportsPointerEvents ? (globalThis.document.addEventListener("pointermove", this.onPointerMove, this.Nn), this.interactionDOMElement.addEventListener("pointerdown", this.onPointerDown, this.Nn), this.interactionDOMElement.addEventListener("pointerleave", this.onPointerOut, this.Nn), this.interactionDOMElement.addEventListener("pointerover", this.onPointerOver, this.Nn), globalThis.addEventListener("pointercancel", this.onPointerCancel, this.Nn), globalThis.addEventListener("pointerup", this.onPointerUp, this.Nn)) : (globalThis.document.addEventListener("mousemove", this.onPointerMove, this.Nn), this.interactionDOMElement.addEventListener("mousedown", this.onPointerDown, this.Nn), this.interactionDOMElement.addEventListener("mouseout", this.onPointerOut, this.Nn), this.interactionDOMElement.addEventListener("mouseover", this.onPointerOver, this.Nn), globalThis.addEventListener("mouseup", this.onPointerUp, this.Nn)), this.supportsTouchEvents && (this.interactionDOMElement.addEventListener("touchstart", this.onPointerDown, this.Nn), this.interactionDOMElement.addEventListener("touchcancel", this.onPointerCancel, this.Nn), this.interactionDOMElement.addEventListener("touchend", this.onPointerUp, this.Nn), this.interactionDOMElement.addEventListener("touchmove", this.onPointerMove, this.Nn)), this.eventsAdded = !0 } }, i.prototype.removeEvents = function() { if (this.eventsAdded && this.interactionDOMElement) { var t = this.interactionDOMElement.style; globalThis.navigator.msPointerEnabled ? (t.msContentZooming = "", t.msTouchAction = "") : this.supportsPointerEvents && (t.touchAction = ""), this.supportsPointerEvents ? (globalThis.document.removeEventListener("pointermove", this.onPointerMove, this.Nn), this.interactionDOMElement.removeEventListener("pointerdown", this.onPointerDown, this.Nn), this.interactionDOMElement.removeEventListener("pointerleave", this.onPointerOut, this.Nn), this.interactionDOMElement.removeEventListener("pointerover", this.onPointerOver, this.Nn), globalThis.removeEventListener("pointercancel", this.onPointerCancel, this.Nn), globalThis.removeEventListener("pointerup", this.onPointerUp, this.Nn)) : (globalThis.document.removeEventListener("mousemove", this.onPointerMove, this.Nn), this.interactionDOMElement.removeEventListener("mousedown", this.onPointerDown, this.Nn), this.interactionDOMElement.removeEventListener("mouseout", this.onPointerOut, this.Nn), this.interactionDOMElement.removeEventListener("mouseover", this.onPointerOver, this.Nn), globalThis.removeEventListener("mouseup", this.onPointerUp, this.Nn)), this.supportsTouchEvents && (this.interactionDOMElement.removeEventListener("touchstart", this.onPointerDown, this.Nn), this.interactionDOMElement.removeEventListener("touchcancel", this.onPointerCancel, this.Nn), this.interactionDOMElement.removeEventListener("touchend", this.onPointerUp, this.Nn), this.interactionDOMElement.removeEventListener("touchmove", this.onPointerMove, this.Nn)), this.interactionDOMElement = null, this.eventsAdded = !1 } }, i.prototype.tickerUpdate = function(t) { this.Pn += t, this.Pn < this.interactionFrequency || (this.Pn = 0, this.update()) }, i.prototype.update = function() { if (this.interactionDOMElement) if (this.xn) this.xn = !1; else { for (var t in this.cursor = null, this.activeInteractionData) if (this.activeInteractionData.hasOwnProperty(t)) { var i = this.activeInteractionData[t]; if (i.originalEvent && "touch" !== i.pointerType) { var n = this.configureInteractionEventForDOMEvent(this.eventData, i.originalEvent, i); this.processInteractive(n, this.lastObjectRendered, this.processPointerOverOut, !0) } } this.setCursorMode(this.cursor) } }, i.prototype.setCursorMode = function(t) { t = t || "default"; var i = !0; if (globalThis.OffscreenCanvas && this.interactionDOMElement instanceof OffscreenCanvas && (i = !1), this.currentCursorMode !== t) { this.currentCursorMode = t; var n = this.cursorStyles[t]; if (n) switch (typeof n) { case "string": i && (this.interactionDOMElement.style.cursor = n); break; case "function": n(t); break; case "object": i && Object.assign(this.interactionDOMElement.style, n) } else i && "string" == typeof t && !Object.prototype.hasOwnProperty.call(this.cursorStyles, t) && (this.interactionDOMElement.style.cursor = t) } }, i.prototype.dispatchEvent = function(t, i, n) { n.stopPropagationHint && t !== n.stopsPropagatingAt || (n.currentTarget = t, n.type = i, t.emit(i, n), t[i] && t[i](n)) }, i.prototype.delayDispatchEvent = function(t, i, n) { this.delayedEvents.push({ displayObject: t, eventString: i, eventData: n }) }, i.prototype.mapPositionToPoint = function(t, i, n) { var s; s = this.interactionDOMElement.parentElement ? this.interactionDOMElement.getBoundingClientRect() : { x: 0, y: 0, width: this.interactionDOMElement.width, height: this.interactionDOMElement.height, left: 0, top: 0 }; var e = 1 / this.resolution; t.x = this.interactionDOMElement.width / s.width * (i - s.left) * e, t.y = this.interactionDOMElement.height / s.height * (n - s.top) * e }, i.prototype.processInteractive = function(t, i, n, s) { var e = this.search.findHit(t, i, n, s), r = this.delayedEvents; if (!r.length) return e; t.stopPropagationHint = !1; var h = r.length; this.delayedEvents = []; for (var o = 0; o < h; o++) { var u = r[o], a = u.displayObject, l = u.eventString, c = u.eventData; c.stopsPropagatingAt === a && (c.stopPropagationHint = !0), this.dispatchEvent(a, l, c) } return e }, i.prototype.onPointerDown = function(t) { if (!this.supportsTouchEvents || "touch" !== t.pointerType) { var i = this.normalizeToPointerData(t); if (this.autoPreventDefault && i[0].isNormalized)(t.cancelable || !("cancelable" in t)) && t.preventDefault(); for (var n = i.length, s = 0; s < n; s++) { var e = i[s], r = this.getInteractionDataForPointerId(e), h = this.configureInteractionEventForDOMEvent(this.eventData, e, r); if (h.data.originalEvent = t, this.processInteractive(h, this.lastObjectRendered, this.processPointerDown, !0), this.emit("pointerdown", h), "touch" === e.pointerType) this.emit("touchstart", h); else if ("mouse" === e.pointerType || "pen" === e.pointerType) { this.emit(2 === e.button ? "rightdown" : "mousedown", this.eventData) } } } }, i.prototype.processPointerDown = function(t, i, n) { var s = t.data, e = t.data.identifier; if (n) if (i.trackedPointers[e] || (i.trackedPointers[e] = new l(e)), this.dispatchEvent(i, "pointerdown", t), "touch" === s.pointerType) this.dispatchEvent(i, "touchstart", t); else if ("mouse" === s.pointerType || "pen" === s.pointerType) { var r = 2 === s.button; r ? i.trackedPointers[e].rightDown = !0 : i.trackedPointers[e].leftDown = !0, this.dispatchEvent(i, r ? "rightdown" : "mousedown", t) } }, i.prototype.onPointerComplete = function(t, i, n) { for (var s = this.normalizeToPointerData(t), e = s.length, r = t.target !== this.interactionDOMElement ? "outside" : "", h = 0; h < e; h++) { var o = s[h], u = this.getInteractionDataForPointerId(o), a = this.configureInteractionEventForDOMEvent(this.eventData, o, u); if (a.data.originalEvent = t, this.processInteractive(a, this.lastObjectRendered, n, i || !r), this.emit(i ? "pointercancel" : "pointerup" + r, a), "mouse" === o.pointerType || "pen" === o.pointerType) this.emit(2 === o.button ? "rightup" + r : "mouseup" + r, a); else "touch" === o.pointerType && (this.emit(i ? "touchcancel" : "touchend" + r, a), this.releaseInteractionDataForPointerId(o.pointerId)) } }, i.prototype.onPointerCancel = function(t) { this.supportsTouchEvents && "touch" === t.pointerType || this.onPointerComplete(t, !0, this.processPointerCancel) }, i.prototype.processPointerCancel = function(t, i) { var n = t.data, s = t.data.identifier; void 0 !== i.trackedPointers[s] && (delete i.trackedPointers[s], this.dispatchEvent(i, "pointercancel", t), "touch" === n.pointerType && this.dispatchEvent(i, "touchcancel", t)) }, i.prototype.onPointerUp = function(t) { this.supportsTouchEvents && "touch" === t.pointerType || this.onPointerComplete(t, !1, this.processPointerUp) }, i.prototype.processPointerUp = function(t, i, n) { var s = t.data, e = t.data.identifier, r = i.trackedPointers[e], h = "touch" === s.pointerType, o = "mouse" === s.pointerType || "pen" === s.pointerType, u = !1; if (o) { var a = 2 === s.button, c = l.FLAGS, f = void 0 !== r && r.flags & (a ? c.RIGHT_DOWN : c.LEFT_DOWN); n ? (this.dispatchEvent(i, a ? "rightup" : "mouseup", t), f && (this.dispatchEvent(i, a ? "rightclick" : "click", t), u = !0)) : f && this.dispatchEvent(i, a ? "rightupoutside" : "mouseupoutside", t), r && (a ? r.rightDown = !1 : r.leftDown = !1) } n ? (this.dispatchEvent(i, "pointerup", t), h && this.dispatchEvent(i, "touchend", t), r && (o && !u || this.dispatchEvent(i, "pointertap", t), h && (this.dispatchEvent(i, "tap", t), r.over = !1))) : r && (this.dispatchEvent(i, "pointerupoutside", t), h && this.dispatchEvent(i, "touchendoutside", t)), r && r.none && delete i.trackedPointers[e] }, i.prototype.onPointerMove = function(t) { if (!this.supportsTouchEvents || "touch" !== t.pointerType) { var i = this.normalizeToPointerData(t); "mouse" !== i[0].pointerType && "pen" !== i[0].pointerType || (this.xn = !0, this.cursor = null); for (var n = i.length, s = 0; s < n; s++) { var e = i[s], r = this.getInteractionDataForPointerId(e), h = this.configureInteractionEventForDOMEvent(this.eventData, e, r); h.data.originalEvent = t, this.processInteractive(h, this.lastObjectRendered, this.processPointerMove, !0), this.emit("pointermove", h), "touch" === e.pointerType && this.emit("touchmove", h), "mouse" !== e.pointerType && "pen" !== e.pointerType || this.emit("mousemove", h) } "mouse" === i[0].pointerType && this.setCursorMode(this.cursor) } }, i.prototype.processPointerMove = function(t, i, n) { var s = t.data, e = "touch" === s.pointerType, r = "mouse" === s.pointerType || "pen" === s.pointerType; r && this.processPointerOverOut(t, i, n), this.moveWhenInside && !n || (this.dispatchEvent(i, "pointermove", t), e && this.dispatchEvent(i, "touchmove", t), r && this.dispatchEvent(i, "mousemove", t)) }, i.prototype.onPointerOut = function(t) { if (!this.supportsTouchEvents || "touch" !== t.pointerType) { var i = this.normalizeToPointerData(t)[0]; "mouse" === i.pointerType && (this.mouseOverRenderer = !1, this.setCursorMode(null)); var n = this.getInteractionDataForPointerId(i), s = this.configureInteractionEventForDOMEvent(this.eventData, i, n); s.data.originalEvent = i, this.processInteractive(s, this.lastObjectRendered, this.processPointerOverOut, !1), this.emit("pointerout", s), "mouse" === i.pointerType || "pen" === i.pointerType ? this.emit("mouseout", s) : this.releaseInteractionDataForPointerId(n.identifier) } }, i.prototype.processPointerOverOut = function(t, i, n) { var s = t.data, e = t.data.identifier, r = "mouse" === s.pointerType || "pen" === s.pointerType, h = i.trackedPointers[e]; n && !h && (h = i.trackedPointers[e] = new l(e)), void 0 !== h && (n && this.mouseOverRenderer ? (h.over || (h.over = !0, this.delayDispatchEvent(i, "pointerover", t), r && this.delayDispatchEvent(i, "mouseover", t)), r && null === this.cursor && (this.cursor = i.cursor)) : h.over && (h.over = !1, this.dispatchEvent(i, "pointerout", this.eventData), r && this.dispatchEvent(i, "mouseout", t), h.none && delete i.trackedPointers[e])) }, i.prototype.onPointerOver = function(t) { var i = this.normalizeToPointerData(t)[0], n = this.getInteractionDataForPointerId(i), s = this.configureInteractionEventForDOMEvent(this.eventData, i, n); s.data.originalEvent = i, "mouse" === i.pointerType && (this.mouseOverRenderer = !0), this.emit("pointerover", s), "mouse" !== i.pointerType && "pen" !== i.pointerType || this.emit("mouseover", s) }, i.prototype.getInteractionDataForPointerId = function(t) { var i, n = t.pointerId; return 1 === n || "mouse" === t.pointerType ? i = this.mouse : this.activeInteractionData[n] ? i = this.activeInteractionData[n] : ((i = this.interactionDataPool.pop() || new o).identifier = n, this.activeInteractionData[n] = i), i.copyEvent(t), i }, i.prototype.releaseInteractionDataForPointerId = function(t) { var i = this.activeInteractionData[t]; i && (delete this.activeInteractionData[t], i.reset(), this.interactionDataPool.push(i)) }, i.prototype.configureInteractionEventForDOMEvent = function(t, i, n) { return t.data = n, this.mapPositionToPoint(n.global, i.clientX, i.clientY), "touch" === i.pointerType && (i.globalX = n.global.x, i.globalY = n.global.y), n.originalEvent = i, t.reset(), t }, i.prototype.normalizeToPointerData = function(t) { var i = []; if (this.supportsTouchEvents && t instanceof TouchEvent) for (var n = 0, s = t.changedTouches.length; n < s; n++) { var e = t.changedTouches[n]; void 0 === e.button && (e.button = t.touches.length ? 1 : 0), void 0 === e.buttons && (e.buttons = t.touches.length ? 1 : 0), void 0 === e.isPrimary && (e.isPrimary = 1 === t.touches.length && "touchstart" === t.type), void 0 === e.width && (e.width = e.radiusX || 1), void 0 === e.height && (e.height = e.radiusY || 1), void 0 === e.tiltX && (e.tiltX = 0), void 0 === e.tiltY && (e.tiltY = 0), void 0 === e.pointerType && (e.pointerType = "touch"), void 0 === e.pointerId && (e.pointerId = e.identifier || 0), void 0 === e.pressure && (e.pressure = e.force || .5), void 0 === e.twist && (e.twist = 0), void 0 === e.tangentialPressure && (e.tangentialPressure = 0), void 0 === e.layerX && (e.layerX = e.offsetX = e.clientX), void 0 === e.layerY && (e.layerY = e.offsetY = e.clientY), e.isNormalized = !0, i.push(e) } else if (globalThis.MouseEvent && (!(t instanceof MouseEvent) || this.supportsPointerEvents && t instanceof globalThis.PointerEvent)) i.push(t); else { var r = t; void 0 === r.isPrimary && (r.isPrimary = !0), void 0 === r.width && (r.width = 1), void 0 === r.height && (r.height = 1), void 0 === r.tiltX && (r.tiltX = 0), void 0 === r.tiltY && (r.tiltY = 0), void 0 === r.pointerType && (r.pointerType = "mouse"), void 0 === r.pointerId && (r.pointerId = 1), void 0 === r.pressure && (r.pressure = .5), void 0 === r.twist && (r.twist = 0), void 0 === r.tangentialPressure && (r.tangentialPressure = 0), r.isNormalized = !0, i.push(r) } return i }, i.prototype.destroy = function() { this.removeEvents(), this.removeTickerListener(), this.removeAllListeners(), this.renderer = null, this.mouse = null, this.eventData = null, this.interactionDOMElement = null, this.onPointerDown = null, this.processPointerDown = null, this.onPointerUp = null, this.processPointerUp = null, this.onPointerCancel = null, this.processPointerCancel = null, this.onPointerMove = null, this.processPointerMove = null, this.onPointerOut = null, this.processPointerOverOut = null, this.onPointerOver = null, this.search = null }, i }(h.EventEmitter) }, 941: (t, i, n) => { "use strict"; n.d(i, { Hf: () => d, ZA: () => c, mh: () => v }); var s = n(6480), e = n(4577), r = n(229), h = n(6335), o = n(3930); function u(t) { this.Ln && this.Ln !== t.Cn || (this.visible ? (this.displayOrder = t.incDisplayOrder(), this.worldAlpha <= 0 || !this.renderable || (t.Cn = null, this.containerRenderWebGL(t), t.Cn = this.Ln)) : this.displayOrder = 0) } class a { constructor() { this.Tn = new r.E9, this.Un = [ [], [] ], this.kn = 0, this.worksWithLayers = !0 } recursiveFindHit(t, i, n, s, e) { if (!i || !i.visible) return 0; let r = 0, h = s = i.interactive || s; i.hitArea && (h = !1), i.Ln && (e = !1); const o = i.Gi; n < 1 / 0 && o && o.containsPoint && !o.containsPoint(t) && (e = !0), n < 1 / 0 && i.filterArea && (i.filterArea.contains(t.x, t.y) || (e = !0)); const u = i.children; if (i.interactiveChildren && u) for (let i = u.length - 1; i >= 0; i--) { const s = u[i], o = this.recursiveFindHit(t, s, n, h, e); if (o) { if (!s.parent) continue; r = o, n = o } } return s && (e ? i.interactive && this.Fn(i, 0) : (n < i.displayOrder && (i.hitArea ? (i.worldTransform.applyInverse(t, this.Tn), i.hitArea.contains(this.Tn.x, this.Tn.y) && (r = i.displayOrder)) : i.containsPoint && i.containsPoint(t) && (r = i.displayOrder)), i.interactive && this.Fn(i, r === 1 / 0 ? 0 : r))), r } findHit(t, i, n, s) { const e = t.data.global; this.Bn(), this.recursiveFindHit(e, i, s ? 0 : 1 / 0, !1, !1), this.Dn(t, n) } Bn() { this.kn = 1, this.Un || (this.Un = [ [], [] ]), this.Un[0].length = 0, this.Un[1].length = 0 } Fn(t, i) { const n = this.Un; if (i < this.kn) n[0].push(t); else { if (i > this.kn) { this.kn = i; const t = n[1]; for (let i = 0, s = t.length; i < s; i++) n[0].push(t[i]); n[1].length = 0 } n[1].push(t) } } Dn(t, i) { const n = this.Un; let s = n[0]; for (let n = 0, e = s.length; n < e; n++) i && i(t, s[n], !1); s = n[1]; for (let n = 0, e = s.length; n < e; n++) t.target || (t.target = s[n]), i && i(t, s[n], !0) } } function l(t) { const i = t.prototype; var n; i.jn || (Object.assign(i, { Gn: 0, Cn: null, incDisplayOrder() { return ++this.Gn }, jn: e.Th.prototype.render }), i.jn = i.render, i.render = (n = i.render, function(t, i, s, e, r) { i && (i.renderTexture || i.baseTexture) || (this.Gn = 0), this.Cn = null, t.isStage && t.updateStage(), this.plugins.interaction && !this.plugins.interaction.search.worksWithLayers && (this.plugins.interaction.search = new a), n.call(this, t, i, s, e, r) })) } class c extends h.EventEmitter { constructor(t = 0, i = !1) { super(), this.useRenderTexture = !1, this.useDoubleBuffer = !1, this.sortPriority = 0, this.clearColor = new Float32Array([0, 0, 0, 0]), this.canDrawWithoutLayer = !1, this.canDrawInParentStage = !0, this.Cn = null, this.Wn = null, this.Hn = [], this.Xn = -1, this.zIndex = t || 0, this.enableSort = !!i, "function" == typeof i && this.on("sort", i) } doSort(t, i) { if (this.listeners("sort", !0)) for (let t = 0; t < i.length; t++) this.emit("sort", i[t]); i.sort(c.compareZIndex) } static compareZIndex(t, i) { return t.zOrder < i.zOrder ? -1 : t.zOrder > i.zOrder ? 1 : t.updateOrder - i.updateOrder } clear() { this.Cn = null, this.Wn = null, this.Hn.length = 0 } Vn(t, i) { this.check(t), i.Ln = this.Cn, this.Cn ? this.Cn.Hn.push(i) : this.Hn.push(i) } $n(t, i) { this.check(t), this.Cn && c.conflict(), this.Cn = i, this.Wn = t } check(t) { if (this.Xn < c.Yn) this.Xn = c.Yn, this.clear(), this.Wn = t; else if (this.canDrawInParentStage) { let i = this.Wn; for (; i && i !== t;) i = i.zn; this.Wn = i, null === i && this.clear() } } static conflict() { c.Kn + 5e3 < Date.now() && (c.Kn = Date.now()) } } c.Yn = 0, c.Kn = 0; class f { constructor(t) { this.layer = t, this.renderTexture = null, this.doubleBuffer = null, this.currentBufferIndex = 0, this.qn = null, this.Zn = new r.Ae, this.Jn = new r.Ae } init(t) { const i = t ? t.screen.width : 100, n = t ? t.screen.height : 100, s = t ? t.resolution : o.X.RESOLUTION; this.renderTexture = e.TI.create({ width: i, height: n, resolution: s }), this.layer.group.useDoubleBuffer && (this.doubleBuffer = [e.TI.create({ width: i, height: n, resolution: s }), e.TI.create({ width: i, height: n, resolution: s })]) } getRenderTexture() { return this.renderTexture || this.init(), this.renderTexture } pushTexture(t) { const i = t.screen; this.renderTexture || this.init(t); const n = this.renderTexture, s = this.layer.group, e = this.doubleBuffer; if (n.width === i.width && n.height === i.height && n.baseTexture.resolution === t.resolution || (n.baseTexture.resolution = t.resolution, n.resize(i.width, i.height), e && (e[0].baseTexture.resolution = t.resolution, e[0].resize(i.width, i.height), e[1].baseTexture.resolution = t.resolution, e[1].resize(i.width, i.height))), e && (e[0].framebuffer.multisample = n.framebuffer.multisample, e[1].framebuffer.multisample = n.framebuffer.multisample), this.qn = t.renderTexture.current, this.Zn.copyFrom(t.renderTexture.sourceFrame), this.Jn.copyFrom(t.renderTexture.destinationFrame), t.batch.flush(), s.useDoubleBuffer) { let i = e[this.currentBufferIndex]; i.baseTexture.et[t.CONTEXT_UID] || (t.renderTexture.bind(i, void 0, void 0), t.texture.bind(i), s.clearColor && t.renderTexture.clear(s.clearColor)), t.texture.unbind(n.baseTexture), n.baseTexture.et = i.baseTexture.et, n.baseTexture.framebuffer = i.baseTexture.framebuffer, i = e[1 - this.currentBufferIndex], t.renderTexture.bind(i, void 0, void 0) } else t.renderTexture.bind(n, void 0, void 0); s.clearColor && t.renderTexture.clear(s.clearColor); const r = t.filter.defaultFilterStack; r.length > 1 && (r[r.length - 1].renderTexture = t.renderTexture.current) } popTexture(t) { t.batch.flush(), t.framebuffer.blit(); const i = t.filter.defaultFilterStack; i.length > 1 && (i[i.length - 1].renderTexture = this.qn), t.renderTexture.bind(this.qn, this.Zn, this.Jn), this.qn = null; const n = this.renderTexture, s = this.doubleBuffer; if (this.layer.group.useDoubleBuffer) { t.texture.unbind(n.baseTexture), this.currentBufferIndex = 1 - this.currentBufferIndex; const i = s[this.currentBufferIndex]; n.baseTexture.et = i.baseTexture.et, n.baseTexture.framebuffer = i.baseTexture.framebuffer } } destroy() { this.renderTexture && (this.renderTexture.destroy(), this.doubleBuffer && (this.doubleBuffer[0].destroy(!0), this.doubleBuffer[1].destroy(!0))) } } class v extends s.W2 { constructor(t = null) { super(), this.isLayer = !0, this.group = null, this.Hn = [], this.Qn = null, this.ts = null, this.ns = [], this.ss = null, this.insertChildrenBeforeActive = !0, this.insertChildrenAfterActive = !0, t ? (this.group = t, this.zIndex = t.zIndex) : this.group = new c(0, !1), this.Qn = this.children } get useRenderTexture() { return this.group.useRenderTexture } set useRenderTexture(t) { this.group.useRenderTexture = t } get useDoubleBuffer() { return this.group.useDoubleBuffer } set useDoubleBuffer(t) { this.group.useDoubleBuffer = t } get clearColor() { return this.group.clearColor } set clearColor(t) { this.group.clearColor = t } get sortPriority() { return this.group.sortPriority } set sortPriority(t) { this.group.sortPriority = t } getRenderTexture() { return this.textureCache || (this.textureCache = new f(this)), this.textureCache.getRenderTexture() } doSort() { this.group.doSort(this, this.ns) } destroy(t) { this.textureCache && (this.textureCache.destroy(), this.textureCache = null), super.destroy(t) } render(t) { this.prerender(t) && (this.group.useRenderTexture && (this.textureCache || (this.textureCache = new f(this)), this.textureCache.pushTexture(t)), this.containerRenderWebGL(t), this.postrender(t), this.group.useRenderTexture && this.textureCache.popTexture(t)) } layerRenderCanvas(t) { this.prerender(t) && (this.containerRenderCanvas(t), this.postrender(t)) } es(t) { const i = this.Hn; this.ts = t, this.group.$n(t, this); const n = this.group.Hn; i.length = 0; for (let t = 0; t < n.length; t++) n[t].Ln = this, i.push(n[t]); n.length = 0 } rs() { const t = this.children, i = this.Hn, n = this.ns; for (let t = 0; t < i.length; t++) this.emit("display", i[t]); if (n.length = 0, this.insertChildrenBeforeActive) for (let i = 0; i < t.length; i++) n.push(t[i]); for (let t = 0; t < i.length; t++) n.push(i[t]); if (!this.insertChildrenBeforeActive && this.insertChildrenAfterActive) for (let i = 0; i < t.length; i++) n.push(t[i]); this.group.enableSort && this.doSort() } prerender(t) { return (!this.Ln || this.Ln == t.Cn) && (this.visible ? (this.displayOrder = t.incDisplayOrder(), !(this.worldAlpha <= 0 || !this.renderable) && (this.children !== this.ns && this.Qn !== this.children && (this.Qn = this.children), this.Bi++, this.children = this.ns, this.ss = t.Cn, t.Cn = this, !0)) : (this.displayOrder = 0, !1)) } postrender(t) { this.children = this.Qn, t.Cn = this.ss, this.ss = null } } v.prototype.renderCanvas = v.prototype.layerRenderCanvas; class d extends v { constructor() { super(...arguments), this.isStage = !0, this.hs = [], this.os = [], this.zn = null } clear() { this.os.length = 0, this.hs.length = 0 } destroy(t) { this.clear(), super.destroy(t) } updateStage() { this.zn = null, c.Yn++, this.us() } updateAsChildStage(t) { this.zn = t, d.ls = 0, this.us() } us() { this.clear(), this.cs(this); const t = this.os; for (let i = 0; i < t.length; i++) { const n = t[i]; if (n.group.sortPriority) { n.rs(); const t = n.ns; for (let i = 0; i < t.length; i++) this.fs(t[i]) } } for (let i = 0; i < t.length; i++) { const n = t[i]; n.group.sortPriority || n.rs() } } cs(t) { if (!t.visible) return; if (t.isLayer) { const i = t; this.os.push(i), i.es(this) } if (t !== this && t.isStage) { return void t.updateAsChildStage(this) } t.Ln = null; let i = t.parentGroup; i && i.Vn(this, t); const n = t.parentLayer; if (n && (i = n.group, i.Vn(this, t)), t.updateOrder = ++d.ls, t.alpha <= 0 || !t.renderable || !t.layerableChildren || i && i.sortPriority) return; const s = t.children; if (s && s.length) for (let t = 0; t < s.length; t++) this.cs(s[t]) } fs(t) { if (t.alpha <= 0 || !t.renderable || !t.layerableChildren) return; const i = t.children; if (i && i.length) for (let t = 0; t < i.length; t++) this.cs(i[t]) } } d.ls = 0, function() { if (void 0 !== s.s$.prototype.displayOrder) return; Object.assign(s.s$.prototype, { parentLayer: null, Ln: null, parentGroup: null, zOrder: 0, zIndex: 0, updateOrder: 0, displayOrder: 0, layerableChildren: !0, isLayer: !1 }); const t = s.W2.prototype; t.containerRenderWebGL = t.render, t.render = u }(), l(e.Th) }, 1735: (t, i, n) => { "use strict"; n.d(i, { LP: () => T, aN: () => A, kC: () => b }); var s = n(4577), e = function() { function t(t, i, n) { void 0 === i && (i = !1), this.vs = t, this.ds = i, this._s = n, this.ps = this.bs = this.ws = null } return t.prototype.detach = function() { return null !== this.ws && (this.ws.detach(this), !0) }, t }(); /*! * @pixi/loaders - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/loaders is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ function r(t, i) { return t.gs ? (t.ys.ps = i, i.bs = t.ys, t.ys = i) : (t.gs = i, t.ys = i), i.ws = t, i } var h, o = function() { function t() { this.gs = this.ys = void 0 } return t.prototype.handlers = function(t) { void 0 === t && (t = !1); var i = this.gs; if (t) return !!i; for (var n = []; i;) n.push(i), i = i.ps; return n }, t.prototype.has = function(t) { if (!(t instanceof e)) throw new Error("MiniSignal#has(): First arg must be a SignalBinding object."); return t.ws === this }, t.prototype.dispatch = function() { for (var t = arguments, i = [], n = 0; n < arguments.length; n++) i[n] = t[n]; var s = this.gs; if (!s) return !1; for (; s;) s.ds && this.detach(s), s.vs.apply(s._s, i), s = s.ps; return !0 }, t.prototype.add = function(t, i) { if (void 0 === i && (i = null), "function" != typeof t) throw new Error("MiniSignal#add(): First arg must be a Function."); return r(this, new e(t, !1, i)) }, t.prototype.once = function(t, i) { if (void 0 === i && (i = null), "function" != typeof t) throw new Error("MiniSignal#once(): First arg must be a Function."); return r(this, new e(t, !0, i)) }, t.prototype.detach = function(t) { if (!(t instanceof e)) throw new Error("MiniSignal#detach(): First arg must be a SignalBinding object."); return t.ws !== this || (t.bs && (t.bs.ps = t.ps), t.ps && (t.ps.bs = t.bs), t === this.gs ? (this.gs = t.ps, null === t.ps && (this.ys = null)) : t === this.ys && (this.ys = t.bs, this.ys.ps = null), t.ws = null), this }, t.prototype.detachAll = function() { var t = this.gs; if (!t) return this; for (this.gs = this.ys = null; t;) t.ws = null, t = t.ps; return this }, t }(); function u(t, i) { for (var n = { key: ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"], q: { name: "queryKey", parser: /(?:^|&)([^&=]*)=?([^&]*)/g }, parser: { strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ } }, s = n.parser[(i = i || {}).strictMode ? "strict" : "loose"].exec(t), e = {}, r = 14; r--;) e[n.key[r]] = s[r] || ""; return e[n.q.name] = {}, e[n.key[12]].replace(n.q.parser, (function(t, i, s) { i && (e[n.q.name][i] = s) })), e } var a = null; function l() {} function c(t, i, n) { i && 0 === i.indexOf(".") && (i = i.substring(1)), i && (t[i] = n) } function f(t) { return t.toString().replace("object ", "") } var v, d, _, p, m, b = function() { function t(i, n, s) { if (this.Es = l, this.Ss = null, this.As = 0, this.Ts = null, this.Ms = null, this.Os = null, this.Is = null, this.Ns = null, this.Rs = null, this.Ps = null, this.xs = null, "string" != typeof i || "string" != typeof n) throw new Error("Both name and url are required for constructing a resource."); s = s || {}, this.Sn = 0, this.Ls(t.STATUS_FLAGS.DATA_URL, 0 === n.indexOf("data:")), this.name = i, this.url = n, this.extension = this.Cs(), this.data = null, this.crossOrigin = !0 === s.crossOrigin ? "anonymous" : s.crossOrigin, this.timeout = s.timeout || 0, this.loadType = s.loadType || this.Us(), this.xhrType = s.xhrType, this.metadata = s.metadata || {}, this.error = null, this.xhr = null, this.children = [], this.type = t.TYPE.UNKNOWN, this.progressChunk = 0, this.Es = l, this.Ss = null, this.As = 0, this.Ts = this.complete.bind(this), this.Ms = this.St.bind(this), this.Os = this.ks.bind(this), this.Is = this.Fs.bind(this), this.Ns = this.Bs.bind(this), this.Rs = this.Ds.bind(this), this.Ps = this.js.bind(this), this.xs = this.Gs.bind(this), this.onStart = new o, this.onProgress = new o, this.onComplete = new o, this.onAfterMiddleware = new o } return t.setExtensionLoadType = function(i, n) { c(t.Ws, i, n) }, t.setExtensionXhrType = function(i, n) { c(t.Hs, i, n) }, Object.defineProperty(t.prototype, "isDataUrl", { get: function() { return this.Xs(t.STATUS_FLAGS.DATA_URL) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "isComplete", { get: function() { return this.Xs(t.STATUS_FLAGS.COMPLETE) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "isLoading", { get: function() { return this.Xs(t.STATUS_FLAGS.LOADING) }, enumerable: !1, configurable: !0 }), t.prototype.complete = function() { this.Vs(), this.$s() }, t.prototype.abort = function(i) { if (!this.error) { if (this.error = new Error(i), this.Vs(), this.xhr) this.xhr.abort(); else if (this.xdr) this.xdr.abort(); else if (this.data) if (this.data.src) this.data.src = t.EMPTY_GIF; else for (; this.data.firstChild;) this.data.removeChild(this.data.firstChild); this.$s() } }, t.prototype.load = function(i) { var n = this; if (!this.isLoading) if (this.isComplete) i && setTimeout((function() { return i(n) }), 1); else switch (i && this.onComplete.once(i), this.Ls(t.STATUS_FLAGS.LOADING, !0), this.onStart.dispatch(this), !1 !== this.crossOrigin && "string" == typeof this.crossOrigin || (this.crossOrigin = this.Ys(this.url)), this.loadType) { case t.LOAD_TYPE.IMAGE: this.type = t.TYPE.IMAGE, this.zs("image"); break; case t.LOAD_TYPE.AUDIO: this.type = t.TYPE.AUDIO, this.Ks("audio"); break; case t.LOAD_TYPE.VIDEO: this.type = t.TYPE.VIDEO, this.Ks("video"); break; default: void 0 === h && (h = !(!globalThis.XDomainRequest || "withCredentials" in new XMLHttpRequest)), h && this.crossOrigin ? this.qs() : this.Zs() } }, t.prototype.Xs = function(t) { return 0 != (this.Sn & t) }, t.prototype.Ls = function(t, i) { this.Sn = i ? this.Sn | t : this.Sn & ~t }, t.prototype.Vs = function() { clearTimeout(this.As), this.data && this.data.removeEventListener && (this.data.removeEventListener("error", this.Ms, !1), this.data.removeEventListener("load", this.Ts, !1), this.data.removeEventListener("progress", this.Os, !1), this.data.removeEventListener("canplaythrough", this.Ts, !1)), this.xhr && (this.xhr.removeEventListener ? (this.xhr.removeEventListener("error", this.Ns, !1), this.xhr.removeEventListener("timeout", this.Rs, !1), this.xhr.removeEventListener("abort", this.Ps, !1), this.xhr.removeEventListener("progress", this.Os, !1), this.xhr.removeEventListener("load", this.xs, !1)) : (this.xhr.onerror = null, this.xhr.ontimeout = null, this.xhr.onprogress = null, this.xhr.onload = null)) }, t.prototype.$s = function() { if (this.isComplete) throw new Error("Complete called again for an already completed resource."); this.Ls(t.STATUS_FLAGS.COMPLETE, !0), this.Ls(t.STATUS_FLAGS.LOADING, !1), this.onComplete.dispatch(this) }, t.prototype.zs = function(t) { this.data = this.metadata.loadElement ? this.metadata.loadElement : "image" === t && void 0 !== globalThis.Image ? new Image : document.createElement(t), this.crossOrigin && (this.data.crossOrigin = this.crossOrigin), this.metadata.skipSource || (this.data.src = this.url), this.data.addEventListener("error", this.Ms, !1), this.data.addEventListener("load", this.Ts, !1), this.data.addEventListener("progress", this.Os, !1), this.timeout && (this.As = setTimeout(this.Is, this.timeout)) }, t.prototype.Ks = function(t) { if (this.data = this.metadata.loadElement ? this.metadata.loadElement : "audio" === t && void 0 !== globalThis.Audio ? new Audio : document.createElement(t), null !== this.data) { if (this.crossOrigin && (this.data.crossOrigin = this.crossOrigin), !this.metadata.skipSource) if (navigator.isCocoonJS) this.data.src = Array.isArray(this.url) ? this.url[0] : this.url; else if (Array.isArray(this.url)) for (var i = this.metadata.mimeType, n = 0; n < this.url.length; ++n) this.data.appendChild(this.Js(t, this.url[n], Array.isArray(i) ? i[n] : i)); else { i = this.metadata.mimeType; this.data.appendChild(this.Js(t, this.url, Array.isArray(i) ? i[0] : i)) } this.data.addEventListener("error", this.Ms, !1), this.data.addEventListener("load", this.Ts, !1), this.data.addEventListener("progress", this.Os, !1), this.data.addEventListener("canplaythrough", this.Ts, !1), this.data.load(), this.timeout && (this.As = setTimeout(this.Is, this.timeout)) } else this.abort("Unsupported element: " + t) }, t.prototype.Zs = function() { "string" != typeof this.xhrType && (this.xhrType = this.Qs()); var i = this.xhr = new XMLHttpRequest; "use-credentials" === this.crossOrigin && (i.withCredentials = !0), i.open("GET", this.url, !0), i.timeout = this.timeout, i.responseType = this.xhrType === t.XHR_RESPONSE_TYPE.JSON || this.xhrType === t.XHR_RESPONSE_TYPE.DOCUMENT ? t.XHR_RESPONSE_TYPE.TEXT : this.xhrType, i.addEventListener("error", this.Ns, !1), i.addEventListener("timeout", this.Rs, !1), i.addEventListener("abort", this.Ps, !1), i.addEventListener("progress", this.Os, !1), i.addEventListener("load", this.xs, !1), i.send() }, t.prototype.qs = function() { "string" != typeof this.xhrType && (this.xhrType = this.Qs()); var t = this.xhr = new globalThis.XDomainRequest; t.timeout = this.timeout || 5e3, t.onerror = this.Ns, t.ontimeout = this.Rs, t.onprogress = this.Os, t.onload = this.xs, t.open("GET", this.url, !0), setTimeout((function() { return t.send() }), 1) }, t.prototype.Js = function(t, i, n) { n || (n = t + "/" + this.Cs(i)); var s = document.createElement("source"); return s.src = i, s.type = n, s }, t.prototype.St = function(t) { this.abort("Failed to load element using: " + t.target.nodeName) }, t.prototype.ks = function(t) { t && t.lengthComputable && this.onProgress.dispatch(this, t.loaded / t.total) }, t.prototype.Fs = function() { this.abort("Load timed out.") }, t.prototype.Bs = function() { var t = this.xhr; this.abort(f(t) + " Request failed. Status: " + t.status + ', text: "' + t.statusText + '"') }, t.prototype.Ds = function() { this.abort(f(this.xhr) + " Request timed out.") }, t.prototype.js = function() { this.abort(f(this.xhr) + " Request was aborted by the user.") }, t.prototype.Gs = function() { var i = this.xhr, n = "", s = void 0 === i.status ? 200 : i.status; if ("" !== i.responseType && "text" !== i.responseType && void 0 !== i.responseType || (n = i.responseText), 0 === s && (n.length > 0 || i.responseType === t.XHR_RESPONSE_TYPE.BUFFER) ? s = 200 : 1223 === s && (s = 204), 2 === (s / 100 | 0)) { if (this.xhrType === t.XHR_RESPONSE_TYPE.TEXT) this.data = n, this.type = t.TYPE.TEXT; else if (this.xhrType === t.XHR_RESPONSE_TYPE.JSON) try { this.data = JSON.parse(n), this.type = t.TYPE.JSON } catch (t) { return void this.abort("Error trying to parse loaded json: " + t) } else if (this.xhrType === t.XHR_RESPONSE_TYPE.DOCUMENT) try { if (globalThis.DOMParser) { var e = new DOMParser; this.data = e.parseFromString(n, "text/xml") } else { var r = document.createElement("div"); r.innerHTML = n, this.data = r } this.type = t.TYPE.XML } catch (t) { return void this.abort("Error trying to parse loaded xml: " + t) } else this.data = i.response || n; this.complete() } else this.abort("[" + i.status + "] " + i.statusText + ": " + i.responseURL) }, t.prototype.Ys = function(t, i) { if (0 === t.indexOf("data:")) return ""; if (globalThis.origin !== globalThis.location.origin) return "anonymous"; i = i || globalThis.location, a || (a = document.createElement("a")), a.href = t; var n = u(a.href, { strictMode: !0 }); return n.host === i.hostname && (!n.port && "" === i.port || n.port === i.port) && (n.protocol ? n.protocol + ":" : "") === i.protocol ? "" : "anonymous" }, t.prototype.Qs = function() { return t.Hs[this.extension] || t.XHR_RESPONSE_TYPE.TEXT }, t.prototype.Us = function() { return t.Ws[this.extension] || t.LOAD_TYPE.XHR }, t.prototype.Cs = function(t) { void 0 === t && (t = this.url); var i = ""; if (this.isDataUrl) { var n = t.indexOf("/"); i = t.substring(n + 1, t.indexOf(";", n)) } else { var s = t.indexOf("?"), e = t.indexOf("#"), r = Math.min(s > -1 ? s : t.length, e > -1 ? e : t.length); i = (t = t.substring(0, r)).substring(t.lastIndexOf(".") + 1) } return i.toLowerCase() }, t.prototype.te = function(i) { switch (i) { case t.XHR_RESPONSE_TYPE.BUFFER: return "application/octet-binary"; case t.XHR_RESPONSE_TYPE.BLOB: return "application/blob"; case t.XHR_RESPONSE_TYPE.DOCUMENT: return "application/xml"; case t.XHR_RESPONSE_TYPE.JSON: return "application/json"; default: return "text/plain" } }, t }(); function w() {} function g(t) { return function() { for (var i = arguments, n = [], s = 0; s < arguments.length; s++) n[s] = i[s]; if (null === t) throw new Error("Callback was already called."); var e = t; t = null, e.apply(this, n) } } v = b || (b = {}), (d = v.STATUS_FLAGS || (v.STATUS_FLAGS = {}))[d.NONE = 0] = "NONE", d[d.DATA_URL = 1] = "DATA_URL", d[d.COMPLETE = 2] = "COMPLETE", d[d.LOADING = 4] = "LOADING", (_ = v.TYPE || (v.TYPE = {}))[_.UNKNOWN = 0] = "UNKNOWN", _[_.JSON = 1] = "JSON", _[_.XML = 2] = "XML", _[_.IMAGE = 3] = "IMAGE", _[_.AUDIO = 4] = "AUDIO", _[_.VIDEO = 5] = "VIDEO", _[_.TEXT = 6] = "TEXT", (p = v.LOAD_TYPE || (v.LOAD_TYPE = {}))[p.XHR = 1] = "XHR", p[p.IMAGE = 2] = "IMAGE", p[p.AUDIO = 3] = "AUDIO", p[p.VIDEO = 4] = "VIDEO", (m = v.XHR_RESPONSE_TYPE || (v.XHR_RESPONSE_TYPE = {})).DEFAULT = "text", m.BUFFER = "arraybuffer", m.BLOB = "blob", m.DOCUMENT = "document", m.JSON = "json", m.TEXT = "text", v.Ws = { gif: v.LOAD_TYPE.IMAGE, png: v.LOAD_TYPE.IMAGE, bmp: v.LOAD_TYPE.IMAGE, jpg: v.LOAD_TYPE.IMAGE, jpeg: v.LOAD_TYPE.IMAGE, tif: v.LOAD_TYPE.IMAGE, tiff: v.LOAD_TYPE.IMAGE, webp: v.LOAD_TYPE.IMAGE, tga: v.LOAD_TYPE.IMAGE, svg: v.LOAD_TYPE.IMAGE, "svg+xml": v.LOAD_TYPE.IMAGE, mp3: v.LOAD_TYPE.AUDIO, ogg: v.LOAD_TYPE.AUDIO, wav: v.LOAD_TYPE.AUDIO, mp4: v.LOAD_TYPE.VIDEO, webm: v.LOAD_TYPE.VIDEO }, v.Hs = { xhtml: v.XHR_RESPONSE_TYPE.DOCUMENT, html: v.XHR_RESPONSE_TYPE.DOCUMENT, htm: v.XHR_RESPONSE_TYPE.DOCUMENT, xml: v.XHR_RESPONSE_TYPE.DOCUMENT, tmx: v.XHR_RESPONSE_TYPE.DOCUMENT, svg: v.XHR_RESPONSE_TYPE.DOCUMENT, tsx: v.XHR_RESPONSE_TYPE.DOCUMENT, gif: v.XHR_RESPONSE_TYPE.BLOB, png: v.XHR_RESPONSE_TYPE.BLOB, bmp: v.XHR_RESPONSE_TYPE.BLOB, jpg: v.XHR_RESPONSE_TYPE.BLOB, jpeg: v.XHR_RESPONSE_TYPE.BLOB, tif: v.XHR_RESPONSE_TYPE.BLOB, tiff: v.XHR_RESPONSE_TYPE.BLOB, webp: v.XHR_RESPONSE_TYPE.BLOB, tga: v.XHR_RESPONSE_TYPE.BLOB, json: v.XHR_RESPONSE_TYPE.JSON, text: v.XHR_RESPONSE_TYPE.TEXT, txt: v.XHR_RESPONSE_TYPE.TEXT, ttf: v.XHR_RESPONSE_TYPE.BUFFER, otf: v.XHR_RESPONSE_TYPE.BUFFER }, v.EMPTY_GIF = "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="; var y = function(t, i) { this.data = t, this.callback = i }, E = function() { function t(t, i) { var n = this; if (void 0 === i && (i = 1), this.workers = 0, this.saturated = w, this.unsaturated = w, this.empty = w, this.drain = w, this.error = w, this.started = !1, this.paused = !1, this.ie = [], this.ne = function(t, i, s) { if (s && "function" != typeof s) throw new Error("task callback must be a function"); if (n.started = !0, null == t && n.idle()) setTimeout((function() { return n.drain() }), 1); else { var e = new y(t, "function" == typeof s ? s : w); i ? n.ie.unshift(e) : n.ie.push(e), setTimeout(n.process, 1) } }, this.process = function() { for (; !n.paused && n.workers < n.concurrency && n.ie.length;) { var t = n.ie.shift(); 0 === n.ie.length && n.empty(), n.workers += 1, n.workers === n.concurrency && n.saturated(), n.se(t.data, g(n.ps(t))) } }, this.se = t, 0 === i) throw new Error("Concurrency must not be zero"); this.concurrency = i, this.buffer = i / 4 } return t.prototype.ps = function(t) { var i = this; return function() { for (var n = arguments, s = [], e = 0; e < arguments.length; e++) s[e] = n[e]; i.workers -= 1, t.callback.apply(t, s), null != s[0] && i.error(s[0], t.data), i.workers <= i.concurrency - i.buffer && i.unsaturated(), i.idle() && i.drain(), i.process() } }, t.prototype.push = function(t, i) { this.ne(t, !1, i) }, t.prototype.kill = function() { this.workers = 0, this.drain = w, this.started = !1, this.ie = [] }, t.prototype.unshift = function(t, i) { this.ne(t, !0, i) }, t.prototype.length = function() { return this.ie.length }, t.prototype.running = function() { return this.workers }, t.prototype.idle = function() { return this.ie.length + this.workers === 0 }, t.prototype.pause = function() { !0 !== this.paused && (this.paused = !0) }, t.prototype.resume = function() { if (!1 !== this.paused) { this.paused = !1; for (var t = 1; t <= this.concurrency; t++) this.process() } }, t.eachSeries = function(t, i, n, s) { var e = 0, r = t.length; ! function h(o) { o || e === r ? n && n(o) : s ? setTimeout((function() { i(t[e++], h) }), 1) : i(t[e++], h) }() }, t.queue = function(i, n) { return new t(i, n) }, t }(), S = /(#[\w-]+)?$/, A = function() { function t(i, n) { var s = this; void 0 === i && (i = ""), void 0 === n && (n = 10), this.progress = 0, this.loading = !1, this.defaultQueryString = "", this.ee = [], this.re = [], this.he = [], this.oe = function(t, i) { return s.ue(t, i) }, this.resources = {}, this.baseUrl = i, this.ee = [], this.re = [], this.he = [], this.oe = function(t, i) { return s.ue(t, i) }, this.Un = E.queue(this.oe, n), this.Un.pause(), this.resources = {}, this.onProgress = new o, this.onError = new o, this.onLoad = new o, this.onStart = new o, this.onComplete = new o; for (var e = 0; e < t.D.length; ++e) { var r = t.D[e], h = r.pre, u = r.use; h && this.pre(h), u && this.use(u) } this.ae = !1 } return t.prototype.le = function(t, i, n, s) { if (this.loading && (!n || !n.parentResource)) throw new Error("Cannot add resources while the loader is running."); if (this.resources[t]) throw new Error('Resource named "' + t + '" already exists.'); if (i = this.ce(i), this.resources[t] = new b(t, i, n), "function" == typeof s && this.resources[t].onAfterMiddleware.once(s), this.loading) { for (var e = n.parentResource, r = [], h = 0; h < e.children.length; ++h) e.children[h].isComplete || r.push(e.children[h]); var o = e.progressChunk * (r.length + 1) / (r.length + 2); e.children.push(this.resources[t]), e.progressChunk = o; for (h = 0; h < r.length; ++h) r[h].progressChunk = o; this.resources[t].progressChunk = o } return this.Un.push(this.resources[t]), this }, t.prototype.pre = function(t) { return this.ee.push(t), this }, t.prototype.use = function(t) { return this.re.push(t), this }, t.prototype.reset = function() { for (var t in this.progress = 0, this.loading = !1, this.Un.kill(), this.Un.pause(), this.resources) { var i = this.resources[t]; i.Ss && i.Ss.detach(), i.isLoading && i.abort("loader reset") } return this.resources = {}, this }, t.prototype.load = function(t) { if ("function" == typeof t && this.onComplete.once(t), this.loading) return this; if (this.Un.idle()) this.fe(), this.ve(); else { for (var i = 100 / this.Un.ie.length, n = 0; n < this.Un.ie.length; ++n) this.Un.ie[n].data.progressChunk = i; this.fe(), this.Un.resume() } return this }, Object.defineProperty(t.prototype, "concurrency", { get: function() { return this.Un.concurrency }, set: function(t) { this.Un.concurrency = t }, enumerable: !1, configurable: !0 }), t.prototype.ce = function(t) { var i, n = u(t, { strictMode: !0 }); if (i = n.protocol || !n.path || 0 === t.indexOf("//") ? t : this.baseUrl.length && this.baseUrl.lastIndexOf("/") !== this.baseUrl.length - 1 && "/" !== t.charAt(0) ? this.baseUrl + "/" + t : this.baseUrl + t, this.defaultQueryString) { var s = S.exec(i)[0]; - 1 !== (i = i.slice(0, i.length - s.length)).indexOf("?") ? i += "&" + this.defaultQueryString : i += "?" + this.defaultQueryString, i += s } return i }, t.prototype.ue = function(t, i) { var n = this; t.Es = i, E.eachSeries(this.ee, (function(i, s) { i.call(n, t, (function() { s(t.isComplete ? {} : null) })) }), (function() { t.isComplete ? n.de(t) : (t.Ss = t.onComplete.once(n.de, n), t.load()) }), !0) }, t.prototype.fe = function() { this.progress = 0, this.loading = !0, this.onStart.dispatch(this) }, t.prototype.ve = function() { this.progress = 100, this.loading = !1, this.onComplete.dispatch(this, this.resources) }, t.prototype.de = function(t) { var i = this; t.Ss = null, this.he.push(t), t.Es(), E.eachSeries(this.re, (function(n, s) { n.call(i, t, s) }), (function() { t.onAfterMiddleware.dispatch(t), i.progress = Math.min(100, i.progress + t.progressChunk), i.onProgress.dispatch(i, t), t.error ? i.onError.dispatch(t.error, i, t) : i.onLoad.dispatch(i, t), i.he.splice(i.he.indexOf(t), 1), i.Un.idle() && 0 === i.he.length && i.ve() }), !0) }, t.prototype.destroy = function() { this.ae || this.reset() }, Object.defineProperty(t, "shared", { get: function() { var i = t._e; return i || ((i = new t).ae = !0, t._e = i), i }, enumerable: !1, configurable: !0 }), t.registerPlugin = function(i) { return t.D.push(i), i.add && i.add(), t }, t.D = [], t }(); A.prototype.add = function(t, i, n, s) { if (Array.isArray(t)) { for (var e = 0; e < t.length; ++e) this.add(t[e]); return this } if ("object" == typeof t && (n = t, s = i || n.callback || n.onComplete, i = n.url, t = n.name || n.key || n.url), "string" != typeof i && (s = n, n = i, i = t), "string" != typeof i) throw new Error("No url passed to add resource to loader."); return "function" == typeof n && (s = n, n = null), this.le(t, i, n, s) }; var T = function() { function t() {} return t.init = function(t) { t = Object.assign({ sharedLoader: !1 }, t), this.loader = t.sharedLoader ? A.shared : new A }, t.destroy = function() { this.loader && (this.loader.destroy(), this.loader = null) }, t }(), M = function() { function t() {} return t.add = function() { b.setExtensionLoadType("svg", b.LOAD_TYPE.XHR), b.setExtensionXhrType("svg", b.XHR_RESPONSE_TYPE.TEXT) }, t.use = function(t, i) { !t.data || t.type !== b.TYPE.IMAGE && "svg" !== t.extension ? i() : s.xE.fromLoader(t.data, t.url, t.name, t.metadata).then((function(n) { t.texture = n, i() })).catch(i) }, t }(), O = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; A.registerPlugin({ use: function(t, i) { if (t.data) { if (t.xhr && t.xhrType === b.XHR_RESPONSE_TYPE.BLOB) if (self.Blob && "string" != typeof t.data) { if (0 === t.data.type.indexOf("image")) { var n = globalThis.URL || globalThis.webkitURL, s = n.createObjectURL(t.data); return t.blob = t.data, t.data = new Image, t.data.src = s, t.type = b.TYPE.IMAGE, void(t.data.onload = function() { n.revokeObjectURL(s), t.data.onload = null, i() }) } } else { var e = t.xhr.getResponseHeader("content-type"); if (e && 0 === e.indexOf("image")) return t.data = new Image, t.data.src = "data:" + e + ";base64," + function(t) { for (var i = "", n = 0; n < t.length;) { for (var s = [0, 0, 0], e = [0, 0, 0, 0], r = 0; r < s.length; ++r) s[r] = n < t.length ? 255 & t.charCodeAt(n++) : 0; switch (e[0] = s[0] >> 2, e[1] = (3 & s[0]) << 4 | s[1] >> 4, e[2] = (15 & s[1]) << 2 | s[2] >> 6, e[3] = 63 & s[2], n - (t.length - 1)) { case 2: e[3] = 64, e[2] = 64; break; case 1: e[3] = 64 } for (r = 0; r < e.length; ++r) i += O.charAt(e[r]) } return i }(t.xhr.responseText), t.type = b.TYPE.IMAGE, void(t.data.onload = function() { t.data.onload = null, i() }) } i() } else i() } }), A.registerPlugin(M) }, 229: (t, i, n) => { "use strict"; n.d(i, { AB: () => _, Ae: () => l, Cd: () => c, E9: () => u, HS: () => s, Lv: () => A, Pj: () => f, ZX: () => o, tn: () => r, c9: () => d, jl: () => h, mg: () => v, wx: () => T, y3: () => p }); /*! * @pixi/math - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/math is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ var s, e, r = 2 * Math.PI, h = 180 / Math.PI, o = Math.PI / 180; (e = s || (s = {}))[e.POLY = 0] = "POLY", e[e.RECT = 1] = "RECT", e[e.CIRC = 2] = "CIRC", e[e.ELIP = 3] = "ELIP", e[e.RREC = 4] = "RREC"; var u = function() { function t(t, i) { void 0 === t && (t = 0), void 0 === i && (i = 0), this.x = 0, this.y = 0, this.x = t, this.y = i } return t.prototype.clone = function() { return new t(this.x, this.y) }, t.prototype.copyFrom = function(t) { return this.set(t.x, t.y), this }, t.prototype.copyTo = function(t) { return t.set(this.x, this.y), t }, t.prototype.equals = function(t) { return t.x === this.x && t.y === this.y }, t.prototype.set = function(t, i) { return void 0 === t && (t = 0), void 0 === i && (i = t), this.x = t, this.y = i, this }, t.prototype.toString = function() { return "[@pixi/math:Point x=" + this.x + " y=" + this.y + "]" }, t }(), a = [new u, new u, new u, new u], l = function() { function t(t, i, n, e) { void 0 === t && (t = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === e && (e = 0), this.x = Number(t), this.y = Number(i), this.width = Number(n), this.height = Number(e), this.type = s.RECT } return Object.defineProperty(t.prototype, "left", { get: function() { return this.x }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "right", { get: function() { return this.x + this.width }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "top", { get: function() { return this.y }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "bottom", { get: function() { return this.y + this.height }, enumerable: !1, configurable: !0 }), Object.defineProperty(t, "EMPTY", { get: function() { return new t(0, 0, 0, 0) }, enumerable: !1, configurable: !0 }), t.prototype.clone = function() { return new t(this.x, this.y, this.width, this.height) }, t.prototype.copyFrom = function(t) { return this.x = t.x, this.y = t.y, this.width = t.width, this.height = t.height, this }, t.prototype.copyTo = function(t) { return t.x = this.x, t.y = this.y, t.width = this.width, t.height = this.height, t }, t.prototype.contains = function(t, i) { return !(this.width <= 0 || this.height <= 0) && (t >= this.x && t < this.x + this.width && i >= this.y && i < this.y + this.height) }, t.prototype.intersects = function(t, i) { if (!i) return !((this.right > t.right ? t.right : this.right) <= (this.x < t.x ? t.x : this.x)) && (this.bottom > t.bottom ? t.bottom : this.bottom) > (this.y < t.y ? t.y : this.y); var n = this.left, s = this.right, e = this.top, r = this.bottom; if (s <= n || r <= e) return !1; var h = a[0].set(t.left, t.top), o = a[1].set(t.left, t.bottom), u = a[2].set(t.right, t.top), l = a[3].set(t.right, t.bottom); if (u.x <= h.x || o.y <= h.y) return !1; var c = Math.sign(i.a * i.d - i.b * i.c); if (0 === c) return !1; if (i.apply(h, h), i.apply(o, o), i.apply(u, u), i.apply(l, l), Math.max(h.x, o.x, u.x, l.x) <= n || Math.min(h.x, o.x, u.x, l.x) >= s || Math.max(h.y, o.y, u.y, l.y) <= e || Math.min(h.y, o.y, u.y, l.y) >= r) return !1; var f = c * (o.y - h.y), v = c * (h.x - o.x), d = f * n + v * e, _ = f * s + v * e, p = f * n + v * r, m = f * s + v * r; if (Math.max(d, _, p, m) <= f * h.x + v * h.y || Math.min(d, _, p, m) >= f * l.x + v * l.y) return !1; var b = c * (h.y - u.y), w = c * (u.x - h.x), g = b * n + w * e, y = b * s + w * e, E = b * n + w * r, S = b * s + w * r; return !(Math.max(g, y, E, S) <= b * h.x + w * h.y || Math.min(g, y, E, S) >= b * l.x + w * l.y) }, t.prototype.pad = function(t, i) { return void 0 === t && (t = 0), void 0 === i && (i = t), this.x -= t, this.y -= i, this.width += 2 * t, this.height += 2 * i, this }, t.prototype.fit = function(t) { var i = Math.max(this.x, t.x), n = Math.min(this.x + this.width, t.x + t.width), s = Math.max(this.y, t.y), e = Math.min(this.y + this.height, t.y + t.height); return this.x = i, this.width = Math.max(n - i, 0), this.y = s, this.height = Math.max(e - s, 0), this }, t.prototype.ceil = function(t, i) { void 0 === t && (t = 1), void 0 === i && (i = .001); var n = Math.ceil((this.x + this.width - i) * t) / t, s = Math.ceil((this.y + this.height - i) * t) / t; return this.x = Math.floor((this.x + i) * t) / t, this.y = Math.floor((this.y + i) * t) / t, this.width = n - this.x, this.height = s - this.y, this }, t.prototype.enlarge = function(t) { var i = Math.min(this.x, t.x), n = Math.max(this.x + this.width, t.x + t.width), s = Math.min(this.y, t.y), e = Math.max(this.y + this.height, t.y + t.height); return this.x = i, this.width = n - i, this.y = s, this.height = e - s, this }, t.prototype.toString = function() { return "[@pixi/math:Rectangle x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + "]" }, t }(), c = function() { function t(t, i, n) { void 0 === t && (t = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), this.x = t, this.y = i, this.radius = n, this.type = s.CIRC } return t.prototype.clone = function() { return new t(this.x, this.y, this.radius) }, t.prototype.contains = function(t, i) { if (this.radius <= 0) return !1; var n = this.x - t, s = this.y - i; return (n *= n) + (s *= s) <= this.radius * this.radius }, t.prototype.getBounds = function() { return new l(this.x - this.radius, this.y - this.radius, 2 * this.radius, 2 * this.radius) }, t.prototype.toString = function() { return "[@pixi/math:Circle x=" + this.x + " y=" + this.y + " radius=" + this.radius + "]" }, t }(), f = function() { function t(t, i, n, e) { void 0 === t && (t = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === e && (e = 0), this.x = t, this.y = i, this.width = n, this.height = e, this.type = s.ELIP } return t.prototype.clone = function() { return new t(this.x, this.y, this.width, this.height) }, t.prototype.contains = function(t, i) { if (this.width <= 0 || this.height <= 0) return !1; var n = (t - this.x) / this.width, s = (i - this.y) / this.height; return (n *= n) + (s *= s) <= 1 }, t.prototype.getBounds = function() { return new l(this.x - this.width, this.y - this.height, this.width, this.height) }, t.prototype.toString = function() { return "[@pixi/math:Ellipse x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + "]" }, t }(), v = function() { function t() { for (var t = arguments, i = [], n = 0; n < arguments.length; n++) i[n] = t[n]; var e = Array.isArray(i[0]) ? i[0] : i; if ("number" != typeof e[0]) { for (var r = [], h = 0, o = e.length; h < o; h++) r.push(e[h].x, e[h].y); e = r } this.points = e, this.type = s.POLY, this.closeStroke = !0 } return t.prototype.clone = function() { var i = new t(this.points.slice()); return i.closeStroke = this.closeStroke, i }, t.prototype.contains = function(t, i) { for (var n = !1, s = this.points.length / 2, e = 0, r = s - 1; e < s; r = e++) { var h = this.points[2 * e], o = this.points[2 * e + 1], u = this.points[2 * r + 1]; o > i != u > i && t < (i - o) / (u - o) * (this.points[2 * r] - h) + h && (n = !n) } return n }, t.prototype.toString = function() { return "[@pixi/math:PolygoncloseStroke=" + this.closeStroke + "points=" + this.points.reduce((function(t, i) { return t + ", " + i }), "") + "]" }, t }(), d = function() { function t(t, i, n, e, r) { void 0 === t && (t = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === e && (e = 0), void 0 === r && (r = 20), this.x = t, this.y = i, this.width = n, this.height = e, this.radius = r, this.type = s.RREC } return t.prototype.clone = function() { return new t(this.x, this.y, this.width, this.height, this.radius) }, t.prototype.contains = function(t, i) { if (this.width <= 0 || this.height <= 0) return !1; if (t >= this.x && t <= this.x + this.width && i >= this.y && i <= this.y + this.height) { var n = Math.max(0, Math.min(this.radius, Math.min(this.width, this.height) / 2)); if (i >= this.y + n && i <= this.y + this.height - n || t >= this.x + n && t <= this.x + this.width - n) return !0; var s = t - (this.x + n), e = i - (this.y + n), r = n * n; if (s * s + e * e <= r) return !0; if ((s = t - (this.x + this.width - n)) * s + e * e <= r) return !0; if (s * s + (e = i - (this.y + this.height - n)) * e <= r) return !0; if ((s = t - (this.x + n)) * s + e * e <= r) return !0 } return !1 }, t.prototype.toString = function() { return "[@pixi/math:RoundedRectangle x=" + this.x + " y=" + this.y + "width=" + this.width + " height=" + this.height + " radius=" + this.radius + "]" }, t }(), _ = function() { function t(t, i, n, s) { void 0 === n && (n = 0), void 0 === s && (s = 0), this.pe = n, this.me = s, this.cb = t, this.scope = i } return t.prototype.clone = function(i, n) { return void 0 === i && (i = this.cb), void 0 === n && (n = this.scope), new t(i, n, this.pe, this.me) }, t.prototype.set = function(t, i) { return void 0 === t && (t = 0), void 0 === i && (i = t), this.pe === t && this.me === i || (this.pe = t, this.me = i, this.cb.call(this.scope)), this }, t.prototype.copyFrom = function(t) { return this.pe === t.x && this.me === t.y || (this.pe = t.x, this.me = t.y, this.cb.call(this.scope)), this }, t.prototype.copyTo = function(t) { return t.set(this.pe, this.me), t }, t.prototype.equals = function(t) { return t.x === this.pe && t.y === this.me }, t.prototype.toString = function() { return "[@pixi/math:ObservablePoint x=0 y=0 scope=" + this.scope + "]" }, Object.defineProperty(t.prototype, "x", { get: function() { return this.pe }, set: function(t) { this.pe !== t && (this.pe = t, this.cb.call(this.scope)) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "y", { get: function() { return this.me }, set: function(t) { this.me !== t && (this.me = t, this.cb.call(this.scope)) }, enumerable: !1, configurable: !0 }), t }(), p = function() { function t(t, i, n, s, e, r) { void 0 === t && (t = 1), void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === s && (s = 1), void 0 === e && (e = 0), void 0 === r && (r = 0), this.array = null, this.a = t, this.b = i, this.c = n, this.d = s, this.tx = e, this.ty = r } return t.prototype.fromArray = function(t) { this.a = t[0], this.b = t[1], this.c = t[3], this.d = t[4], this.tx = t[2], this.ty = t[5] }, t.prototype.set = function(t, i, n, s, e, r) { return this.a = t, this.b = i, this.c = n, this.d = s, this.tx = e, this.ty = r, this }, t.prototype.toArray = function(t, i) { this.array || (this.array = new Float32Array(9)); var n = i || this.array; return t ? (n[0] = this.a, n[1] = this.b, n[2] = 0, n[3] = this.c, n[4] = this.d, n[5] = 0, n[6] = this.tx, n[7] = this.ty, n[8] = 1) : (n[0] = this.a, n[1] = this.c, n[2] = this.tx, n[3] = this.b, n[4] = this.d, n[5] = this.ty, n[6] = 0, n[7] = 0, n[8] = 1), n }, t.prototype.apply = function(t, i) { i = i || new u; var n = t.x, s = t.y; return i.x = this.a * n + this.c * s + this.tx, i.y = this.b * n + this.d * s + this.ty, i }, t.prototype.applyInverse = function(t, i) { i = i || new u; var n = 1 / (this.a * this.d + this.c * -this.b), s = t.x, e = t.y; return i.x = this.d * n * s + -this.c * n * e + (this.ty * this.c - this.tx * this.d) * n, i.y = this.a * n * e + -this.b * n * s + (-this.ty * this.a + this.tx * this.b) * n, i }, t.prototype.translate = function(t, i) { return this.tx += t, this.ty += i, this }, t.prototype.scale = function(t, i) { return this.a *= t, this.d *= i, this.c *= t, this.b *= i, this.tx *= t, this.ty *= i, this }, t.prototype.rotate = function(t) { var i = Math.cos(t), n = Math.sin(t), s = this.a, e = this.c, r = this.tx; return this.a = s * i - this.b * n, this.b = s * n + this.b * i, this.c = e * i - this.d * n, this.d = e * n + this.d * i, this.tx = r * i - this.ty * n, this.ty = r * n + this.ty * i, this }, t.prototype.append = function(t) { var i = this.a, n = this.b, s = this.c, e = this.d; return this.a = t.a * i + t.b * s, this.b = t.a * n + t.b * e, this.c = t.c * i + t.d * s, this.d = t.c * n + t.d * e, this.tx = t.tx * i + t.ty * s + this.tx, this.ty = t.tx * n + t.ty * e + this.ty, this }, t.prototype.setTransform = function(t, i, n, s, e, r, h, o, u) { return this.a = Math.cos(h + u) * e, this.b = Math.sin(h + u) * e, this.c = -Math.sin(h - o) * r, this.d = Math.cos(h - o) * r, this.tx = t - (n * this.a + s * this.c), this.ty = i - (n * this.b + s * this.d), this }, t.prototype.prepend = function(t) { var i = this.tx; if (1 !== t.a || 0 !== t.b || 0 !== t.c || 1 !== t.d) { var n = this.a, s = this.c; this.a = n * t.a + this.b * t.c, this.b = n * t.b + this.b * t.d, this.c = s * t.a + this.d * t.c, this.d = s * t.b + this.d * t.d } return this.tx = i * t.a + this.ty * t.c + t.tx, this.ty = i * t.b + this.ty * t.d + t.ty, this }, t.prototype.decompose = function(t) { var i = this.a, n = this.b, s = this.c, e = this.d, h = t.pivot, o = -Math.atan2(-s, e), u = Math.atan2(n, i), a = Math.abs(o + u); return a < 1e-5 || Math.abs(r - a) < 1e-5 ? (t.rotation = u, t.skew.x = t.skew.y = 0) : (t.rotation = 0, t.skew.x = o, t.skew.y = u), t.scale.x = Math.sqrt(i * i + n * n), t.scale.y = Math.sqrt(s * s + e * e), t.position.x = this.tx + (h.x * i + h.y * s), t.position.y = this.ty + (h.x * n + h.y * e), t }, t.prototype.invert = function() { var t = this.a, i = this.b, n = this.c, s = this.d, e = this.tx, r = t * s - i * n; return this.a = s / r, this.b = -i / r, this.c = -n / r, this.d = t / r, this.tx = (n * this.ty - s * e) / r, this.ty = -(t * this.ty - i * e) / r, this }, t.prototype.identity = function() { return this.a = 1, this.b = 0, this.c = 0, this.d = 1, this.tx = 0, this.ty = 0, this }, t.prototype.clone = function() { var i = new t; return i.a = this.a, i.b = this.b, i.c = this.c, i.d = this.d, i.tx = this.tx, i.ty = this.ty, i }, t.prototype.copyTo = function(t) { return t.a = this.a, t.b = this.b, t.c = this.c, t.d = this.d, t.tx = this.tx, t.ty = this.ty, t }, t.prototype.copyFrom = function(t) { return this.a = t.a, this.b = t.b, this.c = t.c, this.d = t.d, this.tx = t.tx, this.ty = t.ty, this }, t.prototype.toString = function() { return "[@pixi/math:Matrix a=" + this.a + " b=" + this.b + " c=" + this.c + " d=" + this.d + " tx=" + this.tx + " ty=" + this.ty + "]" }, Object.defineProperty(t, "IDENTITY", { get: function() { return new t }, enumerable: !1, configurable: !0 }), Object.defineProperty(t, "TEMP_MATRIX", { get: function() { return new t }, enumerable: !1, configurable: !0 }), t }(), m = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1], b = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1], w = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1], g = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1], y = [], E = [], S = Math.sign; ! function() { for (var t = 0; t < 16; t++) { var i = []; y.push(i); for (var n = 0; n < 16; n++) for (var s = S(m[t] * m[n] + w[t] * b[n]), e = S(b[t] * m[n] + g[t] * b[n]), r = S(m[t] * w[n] + w[t] * g[n]), h = S(b[t] * w[n] + g[t] * g[n]), o = 0; o < 16; o++) if (m[o] === s && b[o] === e && w[o] === r && g[o] === h) { i.push(o); break } } for (t = 0; t < 16; t++) { var u = new p; u.set(m[t], b[t], w[t], g[t], 0, 0), E.push(u) } }(); var A = { E: 0, SE: 1, S: 2, SW: 3, W: 4, NW: 5, N: 6, NE: 7, MIRROR_VERTICAL: 8, MAIN_DIAGONAL: 10, MIRROR_HORIZONTAL: 12, REVERSE_DIAGONAL: 14, uX: function(t) { return m[t] }, uY: function(t) { return b[t] }, vX: function(t) { return w[t] }, vY: function(t) { return g[t] }, inv: function(t) { return 8 & t ? 15 & t : 7 & -t }, add: function(t, i) { return y[t][i] }, sub: function(t, i) { return y[t][A.inv(i)] }, rotate180: function(t) { return 4 ^ t }, isVertical: function(t) { return 2 == (3 & t) }, byDirection: function(t, i) { return 2 * Math.abs(t) <= Math.abs(i) ? i >= 0 ? A.S : A.N : 2 * Math.abs(i) <= Math.abs(t) ? t > 0 ? A.E : A.W : i > 0 ? t > 0 ? A.SE : A.SW : t > 0 ? A.NE : A.NW }, matrixAppendRotationInv: function(t, i, n, s) { void 0 === n && (n = 0), void 0 === s && (s = 0); var e = E[A.inv(i)]; e.tx = n, e.ty = s, t.append(e) } }, T = function() { function t() { this.worldTransform = new p, this.localTransform = new p, this.position = new _(this.onChange, this, 0, 0), this.scale = new _(this.onChange, this, 1, 1), this.pivot = new _(this.onChange, this, 0, 0), this.skew = new _(this.updateSkew, this, 0, 0), this.be = 0, this.we = 1, this.ge = 0, this.ye = 0, this.Ee = 1, this.Se = 0, this.Te = 0, this.L = 0, this.P = 0 } return t.prototype.onChange = function() { this.Se++ }, t.prototype.updateSkew = function() { this.we = Math.cos(this.be + this.skew.y), this.ge = Math.sin(this.be + this.skew.y), this.ye = -Math.sin(this.be - this.skew.x), this.Ee = Math.cos(this.be - this.skew.x), this.Se++ }, t.prototype.toString = function() { return "[@pixi/math:Transform position=(" + this.position.x + ", " + this.position.y + ") rotation=" + this.rotation + " scale=(" + this.scale.x + ", " + this.scale.y + ") skew=(" + this.skew.x + ", " + this.skew.y + ") ]" }, t.prototype.updateLocalTransform = function() { var t = this.localTransform; this.Se !== this.Te && (t.a = this.we * this.scale.x, t.b = this.ge * this.scale.x, t.c = this.ye * this.scale.y, t.d = this.Ee * this.scale.y, t.tx = this.position.x - (this.pivot.x * t.a + this.pivot.y * t.c), t.ty = this.position.y - (this.pivot.x * t.b + this.pivot.y * t.d), this.Te = this.Se, this.P = -1) }, t.prototype.updateTransform = function(t) { var i = this.localTransform; if (this.Se !== this.Te && (i.a = this.we * this.scale.x, i.b = this.ge * this.scale.x, i.c = this.ye * this.scale.y, i.d = this.Ee * this.scale.y, i.tx = this.position.x - (this.pivot.x * i.a + this.pivot.y * i.c), i.ty = this.position.y - (this.pivot.x * i.b + this.pivot.y * i.d), this.Te = this.Se, this.P = -1), this.P !== t.L) { var n = t.worldTransform, s = this.worldTransform; s.a = i.a * n.a + i.b * n.c, s.b = i.a * n.b + i.b * n.d, s.c = i.c * n.a + i.d * n.c, s.d = i.c * n.b + i.d * n.d, s.tx = i.tx * n.a + i.ty * n.c + n.tx, s.ty = i.tx * n.b + i.ty * n.d + n.ty, this.P = t.L, this.L++ } }, t.prototype.setFromMatrix = function(t) { t.decompose(this), this.Se++ }, Object.defineProperty(t.prototype, "rotation", { get: function() { return this.be }, set: function(t) { this.be !== t && (this.be = t, this.updateSkew()) }, enumerable: !1, configurable: !0 }), t.IDENTITY = new t, t }() }, 3767: (t, i, n) => { "use strict"; n.d(i, { AL: () => c, ZT: () => f }); var s = n(3168), e = n(4936), r = n(4577), h = function(t, i) { return (h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]) })(t, i) }; function o(t, i) { function n() { this.constructor = t } h(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) } var u = function(t) { function i(i, n, s, e) { void 0 === i && (i = 100), void 0 === n && (n = 100), void 0 === s && (s = 10), void 0 === e && (e = 10); var r = t.call(this) || this; return r.segWidth = s, r.segHeight = e, r.width = i, r.height = n, r.build(), r } return o(i, t), i.prototype.build = function() { for (var t = this.segWidth * this.segHeight, i = [], n = [], s = [], e = this.segWidth - 1, r = this.segHeight - 1, h = this.width / e, o = this.height / r, u = 0; u < t; u++) { var a = u % this.segWidth, l = u / this.segWidth | 0; i.push(a * h, l * o), n.push(a / e, l / r) } var c = e * r; for (u = 0; u < c; u++) { var f = u % e, v = u / e | 0, d = v * this.segWidth + f + 1, _ = (v + 1) * this.segWidth + f; s.push(v * this.segWidth + f, d, _, d, (v + 1) * this.segWidth + f + 1, _) } this.buffers[0].data = new Float32Array(i), this.buffers[1].data = new Float32Array(n), this.indexBuffer.data = new Uint16Array(s), this.buffers[0].update(), this.buffers[1].update(), this.indexBuffer.update() }, i }(s.xc), a = function(t) { function i(i, n, s) { void 0 === i && (i = 200), void 0 === s && (s = 0); var e = t.call(this, new Float32Array(4 * n.length), new Float32Array(4 * n.length), new Uint16Array(6 * (n.length - 1))) || this; return e.points = n, e.$ = i, e.textureScale = s, e.build(), e } return o(i, t), Object.defineProperty(i.prototype, "width", { get: function() { return this.$ }, enumerable: !1, configurable: !0 }), i.prototype.build = function() { var t = this.points; if (t) { var i = this.getBuffer("aVertexPosition"), n = this.getBuffer("aTextureCoord"), s = this.getIndex(); if (!(t.length < 1)) { i.data.length / 4 !== t.length && (i.data = new Float32Array(4 * t.length), n.data = new Float32Array(4 * t.length), s.data = new Uint16Array(6 * (t.length - 1))); var e = n.data, r = s.data; e[0] = 0, e[1] = 0, e[2] = 0, e[3] = 1; for (var h = 0, o = t[0], u = this.$ * this.textureScale, a = t.length, l = 0; l < a; l++) { var c = 4 * l; if (this.textureScale > 0) { var f = o.x - t[l].x, v = o.y - t[l].y, d = Math.sqrt(f * f + v * v); o = t[l], h += d / u } else h = l / (a - 1); e[c] = h, e[c + 1] = 0, e[c + 2] = h, e[c + 3] = 1 } var _ = 0; for (l = 0; l < a - 1; l++) { r[_++] = c = 2 * l, r[_++] = c + 1, r[_++] = c + 2, r[_++] = c + 2, r[_++] = c + 1, r[_++] = c + 3 } n.update(), s.update(), this.updateVertices() } } }, i.prototype.updateVertices = function() { var t = this.points; if (!(t.length < 1)) { for (var i, n = t[0], s = 0, e = 0, r = this.buffers[0].data, h = t.length, o = 0; o < h; o++) { var u = t[o], a = 4 * o; e = -((i = o < t.length - 1 ? t[o + 1] : u).x - n.x), s = i.y - n.y; var l = Math.sqrt(s * s + e * e), c = this.textureScale > 0 ? this.textureScale * this.$ / 2 : this.$ / 2; s /= l, e /= l, e *= c, r[a] = u.x + (s *= c), r[a + 1] = u.y + e, r[a + 2] = u.x - s, r[a + 3] = u.y - e, n = u } this.buffers[0].update() } }, i.prototype.update = function() { this.textureScale > 0 ? this.build() : this.updateVertices() }, i }(s.xc), l = (function(t) { function i(i, n, r) { void 0 === r && (r = 0); var h = this, o = new a(i.height, n, r), u = new s.rY(i); return r > 0 && (i.baseTexture.wrapMode = e.Nt.REPEAT), (h = t.call(this, o, u) || this).autoUpdate = !0, h } o(i, t), i.prototype.Ki = function(i) { var n = this.geometry; (this.autoUpdate || n.$ !== this.shader.texture.height) && (n.$ = this.shader.texture.height, n.update()), t.prototype.Ki.call(this, i) } }(s.Kj), function(t) { function i(i, n, e) { var h = this, o = new u(i.width, i.height, n, e), a = new s.rY(r.xE.WHITE); return (h = t.call(this, o, a) || this).texture = i, h.autoResize = !0, h } return o(i, t), i.prototype.textureUpdated = function() { this.Kt = this.shader.texture.Pt; var t = this.geometry, i = this.shader.texture; !this.autoResize || t.width === i.width && t.height === i.height || (t.width = this.shader.texture.width, t.height = this.shader.texture.height, t.build()) }, Object.defineProperty(i.prototype, "texture", { get: function() { return this.shader.texture }, set: function(t) { this.shader.texture !== t && (this.shader.texture = t, this.Kt = -1, t.baseTexture.valid ? this.textureUpdated() : t.once("update", this.textureUpdated, this)) }, enumerable: !1, configurable: !0 }), i.prototype.Ki = function(i) { this.Kt !== this.shader.texture.Pt && this.textureUpdated(), t.prototype.Ki.call(this, i) }, i.prototype.destroy = function(i) { this.shader.texture.off("update", this.textureUpdated, this), t.prototype.destroy.call(this, i) }, i }(s.Kj)), c = function(t) { function i(i, n, e, h, o) { void 0 === i && (i = r.xE.EMPTY); var u = this, a = new s.xc(n, e, h); a.getBuffer("aVertexPosition").static = !1; var l = new s.rY(i); return (u = t.call(this, a, l, null, o) || this).autoUpdate = !0, u } return o(i, t), Object.defineProperty(i.prototype, "vertices", { get: function() { return this.geometry.getBuffer("aVertexPosition").data }, set: function(t) { this.geometry.getBuffer("aVertexPosition").data = t }, enumerable: !1, configurable: !0 }), i.prototype.Ki = function(i) { this.autoUpdate && this.geometry.getBuffer("aVertexPosition").update(), t.prototype.Ki.call(this, i) }, i }(s.Kj), f = function(t) { function i(i, n, s, e, h) { void 0 === n && (n = 10), void 0 === s && (s = 10), void 0 === e && (e = 10), void 0 === h && (h = 10); var o = t.call(this, r.xE.WHITE, 4, 4) || this; return o.Me = i.orig.width, o.Oe = i.orig.height, o.$ = o.Me, o.J = o.Oe, o.Ne = n, o.Re = e, o.Pe = s, o.xe = h, o.texture = i, o } return o(i, t), i.prototype.textureUpdated = function() { this.Kt = this.shader.texture.Pt, this.Le() }, Object.defineProperty(i.prototype, "vertices", { get: function() { return this.geometry.getBuffer("aVertexPosition").data }, set: function(t) { this.geometry.getBuffer("aVertexPosition").data = t }, enumerable: !1, configurable: !0 }), i.prototype.updateHorizontalVertices = function() { var t = this.vertices, i = this.Ce(); t[9] = t[11] = t[13] = t[15] = this.Pe * i, t[17] = t[19] = t[21] = t[23] = this.J - this.xe * i, t[25] = t[27] = t[29] = t[31] = this.J }, i.prototype.updateVerticalVertices = function() { var t = this.vertices, i = this.Ce(); t[2] = t[10] = t[18] = t[26] = this.Ne * i, t[4] = t[12] = t[20] = t[28] = this.$ - this.Re * i, t[6] = t[14] = t[22] = t[30] = this.$ }, i.prototype.Ce = function() { var t = this.Ne + this.Re, i = this.Pe + this.xe; return Math.min(this.$ > t ? 1 : this.$ / t, this.J > i ? 1 : this.J / i) }, Object.defineProperty(i.prototype, "width", { get: function() { return this.$ }, set: function(t) { this.$ = t, this.Le() }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "height", { get: function() { return this.J }, set: function(t) { this.J = t, this.Le() }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "leftWidth", { get: function() { return this.Ne }, set: function(t) { this.Ne = t, this.Le() }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "rightWidth", { get: function() { return this.Re }, set: function(t) { this.Re = t, this.Le() }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "topHeight", { get: function() { return this.Pe }, set: function(t) { this.Pe = t, this.Le() }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "bottomHeight", { get: function() { return this.xe }, set: function(t) { this.xe = t, this.Le() }, enumerable: !1, configurable: !0 }), i.prototype.Le = function() { var t = this.texture, i = this.geometry.buffers[1].data; this.Me = t.orig.width, this.Oe = t.orig.height; var n = 1 / this.Me, s = 1 / this.Oe; i[0] = i[8] = i[16] = i[24] = 0, i[1] = i[3] = i[5] = i[7] = 0, i[6] = i[14] = i[22] = i[30] = 1, i[25] = i[27] = i[29] = i[31] = 1, i[2] = i[10] = i[18] = i[26] = n * this.Ne, i[4] = i[12] = i[20] = i[28] = 1 - n * this.Re, i[9] = i[11] = i[13] = i[15] = s * this.Pe, i[17] = i[19] = i[21] = i[23] = 1 - s * this.xe, this.updateHorizontalVertices(), this.updateVerticalVertices(), this.geometry.buffers[0].update(), this.geometry.buffers[1].update() }, i }(l) }, 3168: (t, i, n) => { "use strict"; n.d(i, { Kj: () => d, rY: () => _, xc: () => p }); var s = n(4577), e = n(229), r = n(4936), h = n(6480), o = n(3930), u = n(6335), a = function(t, i) { return (a = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]) })(t, i) }; function l(t, i) { function n() { this.constructor = t } a(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) } var c = function() { function t(t, i) { this.uvBuffer = t, this.uvMatrix = i, this.data = null, this.Ue = -1, this.ke = -1, this.Pt = 0 } return t.prototype.update = function(t) { if (t || this.Ue !== this.uvBuffer.Pt || this.ke !== this.uvMatrix.Pt) { this.Ue = this.uvBuffer.Pt, this.ke = this.uvMatrix.Pt; var i = this.uvBuffer.data; this.data && this.data.length === i.length || (this.data = new Float32Array(i.length)), this.uvMatrix.multiplyUvs(i, this.data), this.Pt++ } }, t }(), f = new e.E9, v = new e.mg, d = function(t) { function i(i, n, e, h) { void 0 === h && (h = r.lg.TRIANGLES); var u = t.call(this) || this; return u.geometry = i, u.shader = n, u.state = e || s.ZM.for2d(), u.drawMode = h, u.start = 0, u.size = 0, u.uvs = null, u.indices = null, u.vertexData = new Float32Array(1), u.vertexDirty = -1, u.an = -1, u.Fe = o.X.ROUND_PIXELS, u.batchUvs = null, u } return l(i, t), Object.defineProperty(i.prototype, "geometry", { get: function() { return this.un }, set: function(t) { this.un !== t && (this.un && (this.un.refCount--, 0 === this.un.refCount && this.un.dispose()), this.un = t, this.un && this.un.refCount++, this.vertexDirty = -1) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "uvBuffer", { get: function() { return this.geometry.buffers[1] }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "verticesBuffer", { get: function() { return this.geometry.buffers[0] }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "material", { get: function() { return this.shader }, set: function(t) { this.shader = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "blendMode", { get: function() { return this.state.blendMode }, set: function(t) { this.state.blendMode = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "roundPixels", { get: function() { return this.Fe }, set: function(t) { this.Fe !== t && (this.an = -1), this.Fe = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "tint", { get: function() { return "tint" in this.shader ? this.shader.tint : null }, set: function(t) { this.shader.tint = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "texture", { get: function() { return "texture" in this.shader ? this.shader.texture : null }, set: function(t) { this.shader.texture = t }, enumerable: !1, configurable: !0 }), i.prototype.Ki = function(t) { this.shader.batchable && this.drawMode === r.lg.TRIANGLES && this.geometry.buffers[0].data.length < 2 * i.BATCHABLE_SIZE ? this.Be(t) : this.De(t) }, i.prototype.De = function(t) { var i = this.shader; i.alpha = this.worldAlpha, i.update && i.update(), t.batch.flush(), i.uniforms.translationMatrix = this.transform.worldTransform.toArray(!0), t.shader.bind(i), t.state.set(this.state), t.geometry.bind(this.geometry, i), t.geometry.draw(this.drawMode, this.size, this.start, this.geometry.instanceCount) }, i.prototype.Be = function(t) { var i = this.geometry, n = this.shader; n.uvMatrix && (n.uvMatrix.update(), this.calculateUvs()), this.calculateVertices(), this.indices = i.indexBuffer.data, this.xi = n.xi, this.Ft = n.texture; var s = this.material.pluginName; t.batch.setObjectRenderer(t.plugins[s]), t.plugins[s].render(this) }, i.prototype.calculateVertices = function() { var t = this.geometry.buffers[0], i = t.data, n = t.Pt; if (n !== this.vertexDirty || this.an !== this.transform.L) { this.an = this.transform.L, this.vertexData.length !== i.length && (this.vertexData = new Float32Array(i.length)); for (var s = this.transform.worldTransform, e = s.a, r = s.b, h = s.c, u = s.d, a = s.tx, l = s.ty, c = this.vertexData, f = 0; f < c.length / 2; f++) { var v = i[2 * f], d = i[2 * f + 1]; c[2 * f] = e * v + h * d + a, c[2 * f + 1] = r * v + u * d + l } if (this.Fe) { var _ = o.X.RESOLUTION; for (f = 0; f < c.length; ++f) c[f] = Math.round((c[f] * _ | 0) / _) } this.vertexDirty = n } }, i.prototype.calculateUvs = function() { var t = this.geometry.buffers[1], i = this.shader; i.uvMatrix.isSimple ? this.uvs = t.data : (this.batchUvs || (this.batchUvs = new c(t, i.uvMatrix)), this.batchUvs.update(), this.uvs = this.batchUvs.data) }, i.prototype.$i = function() { this.calculateVertices(), this.ki.addVertexData(this.vertexData, 0, this.vertexData.length) }, i.prototype.containsPoint = function(t) { if (!this.getBounds().contains(t.x, t.y)) return !1; this.worldTransform.applyInverse(t, f); for (var i = this.geometry.getBuffer("aVertexPosition").data, n = v.points, s = this.geometry.getIndex().data, e = s.length, r = 4 === this.drawMode ? 3 : 1, h = 0; h + 2 < e; h += r) { var o = 2 * s[h], u = 2 * s[h + 1], a = 2 * s[h + 2]; if (n[0] = i[o], n[1] = i[o + 1], n[2] = i[u], n[3] = i[u + 1], n[4] = i[a], n[5] = i[a + 1], v.contains(f.x, f.y)) return !0 } return !1 }, i.prototype.destroy = function(i) { t.prototype.destroy.call(this, i), this.je && (this.je.destroy(), this.je = null), this.geometry = null, this.shader = null, this.state = null, this.uvs = null, this.indices = null, this.vertexData = null }, i.BATCHABLE_SIZE = 100, i }(h.W2), _ = function(t) { function i(i, n) { var r = this, h = { uSampler: i, alpha: 1, uTextureMatrix: e.y3.IDENTITY, uColor: new Float32Array([1, 1, 1, 1]) }; return (n = Object.assign({ tint: 16777215, alpha: 1, pluginName: "batch" }, n)).uniforms && Object.assign(h, n.uniforms), (r = t.call(this, n.program || s.$r.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n", "varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n"), h) || this).Ge = !1, r.uvMatrix = new s.UX(i), r.batchable = void 0 === n.program, r.pluginName = n.pluginName, r.tint = n.tint, r.alpha = n.alpha, r } return l(i, t), Object.defineProperty(i.prototype, "texture", { get: function() { return this.uniforms.uSampler }, set: function(t) { this.uniforms.uSampler !== t && (this.uniforms.uSampler = t, this.uvMatrix.texture = t) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "alpha", { get: function() { return this.We }, set: function(t) { t !== this.We && (this.We = t, this.Ge = !0) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "tint", { get: function() { return this.ln }, set: function(t) { t !== this.ln && (this.ln = t, this.xi = (t >> 16) + (65280 & t) + ((255 & t) << 16), this.Ge = !0) }, enumerable: !1, configurable: !0 }), i.prototype.update = function() { this.Ge && (this.Ge = !1, (0, u.premultiplyTintToRgba)(this.ln, this.We, this.uniforms.uColor, this.texture.baseTexture.alphaMode)); this.uvMatrix.update() && (this.uniforms.uTextureMatrix = this.uvMatrix.mapCoord) }, i }(s.ex), p = function(t) { function i(i, n, e) { var h = t.call(this) || this, o = new s.lW(i), u = new s.lW(n, !0), a = new s.lW(e, !0, !0); return h.addAttribute("aVertexPosition", o, 2, !1, r.vK.FLOAT).addAttribute("aTextureCoord", u, 2, !1, r.vK.FLOAT).addIndex(a), h.He = -1, h } return l(i, t), Object.defineProperty(i.prototype, "vertexDirtyId", { get: function() { return this.buffers[0].Pt }, enumerable: !1, configurable: !0 }), i }(s.ZX) }, 5868: (t, i, n) => { "use strict"; var s, e, r, h, o, u, a, l, c, f, v, d, _, p, m, b, w, g, y, E, S, A, T, M, O, I, N, R, P, x, L, C, U, k, F, B, D, j, G = n(4577), W = n(5849), H = n(6480), X = n(229), V = n(6335), $ = n(3930); (e = s || (s = {}))[e.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", e[e.WEBGL = 1] = "WEBGL", e[e.WEBGL2 = 2] = "WEBGL2", (h = r || (r = {}))[h.UNKNOWN = 0] = "UNKNOWN", h[h.WEBGL = 1] = "WEBGL", h[h.CANVAS = 2] = "CANVAS", (u = o || (o = {}))[u.COLOR = 16384] = "COLOR", u[u.DEPTH = 256] = "DEPTH", u[u.STENCIL = 1024] = "STENCIL", (l = a || (a = {}))[l.NORMAL = 0] = "NORMAL", l[l.ADD = 1] = "ADD", l[l.MULTIPLY = 2] = "MULTIPLY", l[l.SCREEN = 3] = "SCREEN", l[l.OVERLAY = 4] = "OVERLAY", l[l.DARKEN = 5] = "DARKEN", l[l.LIGHTEN = 6] = "LIGHTEN", l[l.COLOR_DODGE = 7] = "COLOR_DODGE", l[l.COLOR_BURN = 8] = "COLOR_BURN", l[l.HARD_LIGHT = 9] = "HARD_LIGHT", l[l.SOFT_LIGHT = 10] = "SOFT_LIGHT", l[l.DIFFERENCE = 11] = "DIFFERENCE", l[l.EXCLUSION = 12] = "EXCLUSION", l[l.HUE = 13] = "HUE", l[l.SATURATION = 14] = "SATURATION", l[l.COLOR = 15] = "COLOR", l[l.LUMINOSITY = 16] = "LUMINOSITY", l[l.NORMAL_NPM = 17] = "NORMAL_NPM", l[l.ADD_NPM = 18] = "ADD_NPM", l[l.SCREEN_NPM = 19] = "SCREEN_NPM", l[l.NONE = 20] = "NONE", l[l.SRC_OVER = 0] = "SRC_OVER", l[l.SRC_IN = 21] = "SRC_IN", l[l.SRC_OUT = 22] = "SRC_OUT", l[l.SRC_ATOP = 23] = "SRC_ATOP", l[l.DST_OVER = 24] = "DST_OVER", l[l.DST_IN = 25] = "DST_IN", l[l.DST_OUT = 26] = "DST_OUT", l[l.DST_ATOP = 27] = "DST_ATOP", l[l.ERASE = 26] = "ERASE", l[l.SUBTRACT = 28] = "SUBTRACT", l[l.XOR = 29] = "XOR", (f = c || (c = {}))[f.POINTS = 0] = "POINTS", f[f.LINES = 1] = "LINES", f[f.LINE_LOOP = 2] = "LINE_LOOP", f[f.LINE_STRIP = 3] = "LINE_STRIP", f[f.TRIANGLES = 4] = "TRIANGLES", f[f.TRIANGLE_STRIP = 5] = "TRIANGLE_STRIP", f[f.TRIANGLE_FAN = 6] = "TRIANGLE_FAN", (d = v || (v = {}))[d.RGBA = 6408] = "RGBA", d[d.RGB = 6407] = "RGB", d[d.RG = 33319] = "RG", d[d.RED = 6403] = "RED", d[d.RGBA_INTEGER = 36249] = "RGBA_INTEGER", d[d.RGB_INTEGER = 36248] = "RGB_INTEGER", d[d.RG_INTEGER = 33320] = "RG_INTEGER", d[d.RED_INTEGER = 36244] = "RED_INTEGER", d[d.ALPHA = 6406] = "ALPHA", d[d.LUMINANCE = 6409] = "LUMINANCE", d[d.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", d[d.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", d[d.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", (p = _ || (_ = {}))[p.TEXTURE_2D = 3553] = "TEXTURE_2D", p[p.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", p[p.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", p[p.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", p[p.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", p[p.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", p[p.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", p[p.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", p[p.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", (b = m || (m = {}))[b.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", b[b.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", b[b.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", b[b.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", b[b.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", b[b.UNSIGNED_INT = 5125] = "UNSIGNED_INT", b[b.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", b[b.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", b[b.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", b[b.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", b[b.BYTE = 5120] = "BYTE", b[b.SHORT = 5122] = "SHORT", b[b.INT = 5124] = "INT", b[b.FLOAT = 5126] = "FLOAT", b[b.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", b[b.HALF_FLOAT = 36193] = "HALF_FLOAT", (g = w || (w = {}))[g.FLOAT = 0] = "FLOAT", g[g.INT = 1] = "INT", g[g.UINT = 2] = "UINT", (E = y || (y = {}))[E.NEAREST = 0] = "NEAREST", E[E.LINEAR = 1] = "LINEAR", (A = S || (S = {}))[A.CLAMP = 33071] = "CLAMP", A[A.REPEAT = 10497] = "REPEAT", A[A.MIRRORED_REPEAT = 33648] = "MIRRORED_REPEAT", (M = T || (T = {}))[M.OFF = 0] = "OFF", M[M.POW2 = 1] = "POW2", M[M.ON = 2] = "ON", M[M.ON_MANUAL = 3] = "ON_MANUAL", (I = O || (O = {}))[I.NPM = 0] = "NPM", I[I.UNPACK = 1] = "UNPACK", I[I.PMA = 2] = "PMA", I[I.NO_PREMULTIPLIED_ALPHA = 0] = "NO_PREMULTIPLIED_ALPHA", I[I.PREMULTIPLY_ON_UPLOAD = 1] = "PREMULTIPLY_ON_UPLOAD", I[I.PREMULTIPLY_ALPHA = 2] = "PREMULTIPLY_ALPHA", I[I.PREMULTIPLIED_ALPHA = 2] = "PREMULTIPLIED_ALPHA", (R = N || (N = {}))[R.NO = 0] = "NO", R[R.YES = 1] = "YES", R[R.AUTO = 2] = "AUTO", R[R.BLEND = 0] = "BLEND", R[R.CLEAR = 1] = "CLEAR", R[R.BLIT = 2] = "BLIT", (x = P || (P = {}))[x.AUTO = 0] = "AUTO", x[x.MANUAL = 1] = "MANUAL", (C = L || (L = {})).LOW = "lowp", C.MEDIUM = "mediump", C.HIGH = "highp", (k = U || (U = {}))[k.NONE = 0] = "NONE", k[k.SCISSOR = 1] = "SCISSOR", k[k.STENCIL = 2] = "STENCIL", k[k.SPRITE = 3] = "SPRITE", (B = F || (F = {}))[B.NONE = 0] = "NONE", B[B.LOW = 2] = "LOW", B[B.MEDIUM = 4] = "MEDIUM", B[B.HIGH = 8] = "HIGH", (j = D || (D = {}))[j.ELEMENT_ARRAY_BUFFER = 34963] = "ELEMENT_ARRAY_BUFFER", j[j.ARRAY_BUFFER = 34962] = "ARRAY_BUFFER", j[j.UNIFORM_BUFFER = 35345] = "UNIFORM_BUFFER"; var Y = new X.y3; H.s$.prototype.Xe = !1, H.s$.prototype.Ve = null, H.s$.prototype.$e = null, H.s$.prototype.Ye = F.NONE; var z = function() { this.textureCacheId = null, this.originalRender = null, this.originalRenderCanvas = null, this.originalCalculateBounds = null, this.originalGetLocalBounds = null, this.originalUpdateTransform = null, this.originalDestroy = null, this.originalMask = null, this.originalFilterArea = null, this.originalContainsPoint = null, this.sprite = null }; Object.defineProperties(H.s$.prototype, { cacheAsBitmapResolution: { get: function() { return this.$e }, set: function(t) { t !== this.$e && (this.$e = t, this.cacheAsBitmap && (this.cacheAsBitmap = !1, this.cacheAsBitmap = !0)) } }, cacheAsBitmapMultisample: { get: function() { return this.Ye }, set: function(t) { t !== this.Ye && (this.Ye = t, this.cacheAsBitmap && (this.cacheAsBitmap = !1, this.cacheAsBitmap = !0)) } }, cacheAsBitmap: { get: function() { return this.Xe }, set: function(t) { var i; this.Xe !== t && (this.Xe = t, t ? (this.Ve || (this.Ve = new z), (i = this.Ve).originalRender = this.render, i.originalRenderCanvas = this.renderCanvas, i.originalUpdateTransform = this.updateTransform, i.originalCalculateBounds = this.calculateBounds, i.originalGetLocalBounds = this.getLocalBounds, i.originalDestroy = this.destroy, i.originalContainsPoint = this.containsPoint, i.originalMask = this.Gi, i.originalFilterArea = this.filterArea, this.render = this.ze, this.renderCanvas = this.Ke, this.destroy = this.qe) : ((i = this.Ve).sprite && this.Ze(), this.render = i.originalRender, this.renderCanvas = i.originalRenderCanvas, this.calculateBounds = i.originalCalculateBounds, this.getLocalBounds = i.originalGetLocalBounds, this.destroy = i.originalDestroy, this.updateTransform = i.originalUpdateTransform, this.containsPoint = i.originalContainsPoint, this.Gi = i.originalMask, this.filterArea = i.originalFilterArea)) } } }), H.s$.prototype.ze = function(t) { !this.visible || this.worldAlpha <= 0 || !this.renderable || (this.Je(t), this.Ve.sprite.transform.L = this.transform.L, this.Ve.sprite.worldAlpha = this.worldAlpha, this.Ve.sprite.Ki(t)) }, H.s$.prototype.Je = function(t) { var i; if (!this.Ve || !this.Ve.sprite) { var n = this.alpha; this.alpha = 1, t.batch.flush(); var s = this.getLocalBounds(null, !0).clone(); if (this.filters && this.filters.length) s.pad(this.filters[0].padding); s.ceil($.X.RESOLUTION); var e = t.renderTexture.current, r = t.renderTexture.sourceFrame.clone(), h = t.renderTexture.destinationFrame.clone(), o = t.projection.transform, u = G.TI.create({ width: s.width, height: s.height, resolution: this.cacheAsBitmapResolution || t.resolution, multisample: null !== (i = this.cacheAsBitmapMultisample) && void 0 !== i ? i : t.multisample }), a = "cacheAsBitmap_" + (0, V.uid)(); this.Ve.textureCacheId = a, G.VL.addToCache(u.baseTexture, a), G.xE.addToCache(u, a); var l = this.transform.localTransform.copyTo(Y).invert().translate(-s.x, -s.y); this.render = this.Ve.originalRender, t.render(this, { renderTexture: u, clear: !0, transform: l, skipUpdateTransform: !1 }), t.framebuffer.blit(), t.projection.transform = o, t.renderTexture.bind(e, r, h), this.render = this.ze, this.updateTransform = this.displayObjectUpdateTransform, this.calculateBounds = this.tr, this.getLocalBounds = this.ir, this.Gi = null, this.filterArea = null, this.alpha = n; var c = new W.j(u); c.transform.worldTransform = this.transform.worldTransform, c.anchor.x = -s.x / s.width, c.anchor.y = -s.y / s.height, c.alpha = n, c.ki = this.ki, this.Ve.sprite = c, this.transform.P = -1, this.parent ? this.updateTransform() : (this.enableTempParent(), this.updateTransform(), this.disableTempParent(null)), this.containsPoint = c.containsPoint.bind(c) } }, H.s$.prototype.Ke = function(t) { !this.visible || this.worldAlpha <= 0 || !this.renderable || (this.nr(t), this.Ve.sprite.worldAlpha = this.worldAlpha, this.Ve.sprite.sr(t)) }, H.s$.prototype.nr = function(t) { if (!this.Ve || !this.Ve.sprite) { var i = this.getLocalBounds(null, !0), n = this.alpha; this.alpha = 1; var s = t.context, e = t.er; i.ceil($.X.RESOLUTION); var r = G.TI.create({ width: i.width, height: i.height }), h = "cacheAsBitmap_" + (0, V.uid)(); this.Ve.textureCacheId = h, G.VL.addToCache(r.baseTexture, h), G.xE.addToCache(r, h); var o = Y; this.transform.localTransform.copyTo(o), o.invert(), o.tx -= i.x, o.ty -= i.y, this.renderCanvas = this.Ve.originalRenderCanvas, t.render(this, { renderTexture: r, clear: !0, transform: o, skipUpdateTransform: !1 }), t.context = s, t.er = e, this.renderCanvas = this.Ke, this.updateTransform = this.displayObjectUpdateTransform, this.calculateBounds = this.tr, this.getLocalBounds = this.ir, this.Gi = null, this.filterArea = null, this.alpha = n; var u = new W.j(r); u.transform.worldTransform = this.transform.worldTransform, u.anchor.x = -i.x / i.width, u.anchor.y = -i.y / i.height, u.alpha = n, u.ki = this.ki, this.Ve.sprite = u, this.transform.P = -1, this.parent ? this.updateTransform() : (this.parent = t.ri, this.updateTransform(), this.parent = null), this.containsPoint = u.containsPoint.bind(u) } }, H.s$.prototype.tr = function() { this.ki.clear(), this.Ve.sprite.transform.L = this.transform.L, this.Ve.sprite.$i(), this.ki.updateID = this.Bi }, H.s$.prototype.ir = function() { return this.Ve.sprite.getLocalBounds(null) }, H.s$.prototype.Ze = function() { this.Ve.sprite.Ft.destroy(!0), this.Ve.sprite = null, G.VL.removeFromCache(this.Ve.textureCacheId), G.xE.removeFromCache(this.Ve.textureCacheId), this.Ve.textureCacheId = null }, H.s$.prototype.qe = function(t) { this.cacheAsBitmap = !1, this.destroy(t) } }, 4062: (t, i, n) => { "use strict"; var s = n(6480); /*! * @pixi/mixin-get-child-by-name - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/mixin-get-child-by-name is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ s.s$.prototype.name = null, s.W2.prototype.getChildByName = function(t, i) { for (var n = 0, s = this.children.length; n < s; n++) if (this.children[n].name === t) return this.children[n]; if (i) for (n = 0, s = this.children.length; n < s; n++) { if (this.children[n].getChildByName) { var e = this.children[n].getChildByName(t, !0); if (e) return e } } return null } }, 6002: (t, i, n) => { "use strict"; var s = n(6480), e = n(229); /*! * @pixi/mixin-get-global-position - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/mixin-get-global-position is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ s.s$.prototype.getGlobalPosition = function(t, i) { return void 0 === t && (t = new e.E9), void 0 === i && (i = !1), this.parent ? this.parent.toGlobal(this.position, t, i) : (t.x = this.position.x, t.y = this.position.y), t } }, 4433: (t, i, n) => { "use strict"; n.d(i, { R: () => s }); /*! * @pixi/runner - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/runner is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ var s = function() { function t(t) { this.items = [], this.rr = t, this.hr = 0 } return t.prototype.emit = function(t, i, n, s, e, r, h, o) { if (arguments.length > 8) throw new Error("max arguments reached"); var u = this.name, a = this.items; this.hr++; for (var l = 0, c = a.length; l < c; l++) a[l][u](t, i, n, s, e, r, h, o); return a === this.items && this.hr--, this }, t.prototype.ensureNonAliasedItems = function() { this.hr > 0 && this.items.length > 1 && (this.hr = 0, this.items = this.items.slice(0)) }, t.prototype.add = function(t) { return t[this.rr] && (this.ensureNonAliasedItems(), this.remove(t), this.items.push(t)), this }, t.prototype.remove = function(t) { var i = this.items.indexOf(t); return -1 !== i && (this.ensureNonAliasedItems(), this.items.splice(i, 1)), this }, t.prototype.contains = function(t) { return -1 !== this.items.indexOf(t) }, t.prototype.removeAll = function() { return this.ensureNonAliasedItems(), this.items.length = 0, this }, t.prototype.destroy = function() { this.removeAll(), this.items = null, this.rr = null }, Object.defineProperty(t.prototype, "empty", { get: function() { return 0 === this.items.length }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "name", { get: function() { return this.rr }, enumerable: !1, configurable: !0 }), t }(); Object.defineProperties(s.prototype, { dispatch: { value: s.prototype.emit }, run: { value: s.prototype.emit } }) }, 3930: (t, i, n) => { "use strict"; n.d(i, { t: () => st, X: () => et }); var s = /iPhone/i, e = /iPod/i, r = /iPad/i, h = /\biOS-universal(?:.+)Mac\b/i, o = /\bAndroid(?:.+)Mobile\b/i, u = /Android/i, a = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i, l = /Silk/i, c = /Windows Phone/i, f = /\bWindows(?:.+)ARM\b/i, v = /BlackBerry/i, d = /BB10/i, _ = /Opera Mini/i, p = /\b(CriOS|Chrome)(?:.+)Mobile/i, m = /Mobile(?:.+)Firefox\b/i, b = function(t) { return void 0 !== t && "MacIntel" === t.platform && "number" == typeof t.maxTouchPoints && t.maxTouchPoints > 1 && "undefined" == typeof MSStream }; /*! * @pixi/settings - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/settings is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ var w, g, y, E, S, A, T, M, O, I, N, R, P, x, L, C, U, k, F, B, D, j, G, W, H, X, V, $, Y, z, K, q, Z, J, Q, tt, it, nt, st = function(t) { var i = { userAgent: "", platform: "", maxTouchPoints: 0 }; t || "undefined" == typeof navigator ? "string" == typeof t ? i.userAgent = t : t && t.userAgent && (i = { userAgent: t.userAgent, platform: t.platform, maxTouchPoints: t.maxTouchPoints || 0 }) : i = { userAgent: navigator.userAgent, platform: navigator.platform, maxTouchPoints: navigator.maxTouchPoints || 0 }; var n = i.userAgent, w = n.split("[FBAN"); void 0 !== w[1] && (n = w[0]), void 0 !== (w = n.split("Twitter"))[1] && (n = w[0]); var g = function(t) { return function(i) { return i.test(t) } }(n), y = { apple: { phone: g(s) && !g(c), ipod: g(e), tablet: !g(s) && (g(r) || b(i)) && !g(c), universal: g(h), device: (g(s) || g(e) || g(r) || g(h) || b(i)) && !g(c) }, amazon: { phone: g(a), tablet: !g(a) && g(l), device: g(a) || g(l) }, android: { phone: !g(c) && g(a) || !g(c) && g(o), tablet: !g(c) && !g(a) && !g(o) && (g(l) || g(u)), device: !g(c) && (g(a) || g(l) || g(o) || g(u)) || g(/\bokhttp\b/i) }, windows: { phone: g(c), tablet: g(f), device: g(c) || g(f) }, other: { blackberry: g(v), blackberry10: g(d), opera: g(_), firefox: g(m), chrome: g(p), device: g(v) || g(d) || g(_) || g(m) || g(p) }, any: !1, phone: !1, tablet: !1 }; return y.any = y.apple.device || y.android.device || y.windows.device || y.other.device, y.phone = y.apple.phone || y.android.phone || y.windows.phone, y.tablet = y.apple.tablet || y.android.tablet || y.windows.tablet, y }(globalThis.navigator); (g = w || (w = {}))[g.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", g[g.WEBGL = 1] = "WEBGL", g[g.WEBGL2 = 2] = "WEBGL2", (E = y || (y = {}))[E.UNKNOWN = 0] = "UNKNOWN", E[E.WEBGL = 1] = "WEBGL", E[E.CANVAS = 2] = "CANVAS", (A = S || (S = {}))[A.COLOR = 16384] = "COLOR", A[A.DEPTH = 256] = "DEPTH", A[A.STENCIL = 1024] = "STENCIL", (M = T || (T = {}))[M.NORMAL = 0] = "NORMAL", M[M.ADD = 1] = "ADD", M[M.MULTIPLY = 2] = "MULTIPLY", M[M.SCREEN = 3] = "SCREEN", M[M.OVERLAY = 4] = "OVERLAY", M[M.DARKEN = 5] = "DARKEN", M[M.LIGHTEN = 6] = "LIGHTEN", M[M.COLOR_DODGE = 7] = "COLOR_DODGE", M[M.COLOR_BURN = 8] = "COLOR_BURN", M[M.HARD_LIGHT = 9] = "HARD_LIGHT", M[M.SOFT_LIGHT = 10] = "SOFT_LIGHT", M[M.DIFFERENCE = 11] = "DIFFERENCE", M[M.EXCLUSION = 12] = "EXCLUSION", M[M.HUE = 13] = "HUE", M[M.SATURATION = 14] = "SATURATION", M[M.COLOR = 15] = "COLOR", M[M.LUMINOSITY = 16] = "LUMINOSITY", M[M.NORMAL_NPM = 17] = "NORMAL_NPM", M[M.ADD_NPM = 18] = "ADD_NPM", M[M.SCREEN_NPM = 19] = "SCREEN_NPM", M[M.NONE = 20] = "NONE", M[M.SRC_OVER = 0] = "SRC_OVER", M[M.SRC_IN = 21] = "SRC_IN", M[M.SRC_OUT = 22] = "SRC_OUT", M[M.SRC_ATOP = 23] = "SRC_ATOP", M[M.DST_OVER = 24] = "DST_OVER", M[M.DST_IN = 25] = "DST_IN", M[M.DST_OUT = 26] = "DST_OUT", M[M.DST_ATOP = 27] = "DST_ATOP", M[M.ERASE = 26] = "ERASE", M[M.SUBTRACT = 28] = "SUBTRACT", M[M.XOR = 29] = "XOR", (I = O || (O = {}))[I.POINTS = 0] = "POINTS", I[I.LINES = 1] = "LINES", I[I.LINE_LOOP = 2] = "LINE_LOOP", I[I.LINE_STRIP = 3] = "LINE_STRIP", I[I.TRIANGLES = 4] = "TRIANGLES", I[I.TRIANGLE_STRIP = 5] = "TRIANGLE_STRIP", I[I.TRIANGLE_FAN = 6] = "TRIANGLE_FAN", (R = N || (N = {}))[R.RGBA = 6408] = "RGBA", R[R.RGB = 6407] = "RGB", R[R.RG = 33319] = "RG", R[R.RED = 6403] = "RED", R[R.RGBA_INTEGER = 36249] = "RGBA_INTEGER", R[R.RGB_INTEGER = 36248] = "RGB_INTEGER", R[R.RG_INTEGER = 33320] = "RG_INTEGER", R[R.RED_INTEGER = 36244] = "RED_INTEGER", R[R.ALPHA = 6406] = "ALPHA", R[R.LUMINANCE = 6409] = "LUMINANCE", R[R.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", R[R.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", R[R.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", (x = P || (P = {}))[x.TEXTURE_2D = 3553] = "TEXTURE_2D", x[x.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", x[x.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", x[x.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", x[x.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", x[x.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", x[x.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", x[x.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", x[x.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", (C = L || (L = {}))[C.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", C[C.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", C[C.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", C[C.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", C[C.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", C[C.UNSIGNED_INT = 5125] = "UNSIGNED_INT", C[C.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", C[C.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", C[C.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", C[C.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", C[C.BYTE = 5120] = "BYTE", C[C.SHORT = 5122] = "SHORT", C[C.INT = 5124] = "INT", C[C.FLOAT = 5126] = "FLOAT", C[C.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", C[C.HALF_FLOAT = 36193] = "HALF_FLOAT", (k = U || (U = {}))[k.FLOAT = 0] = "FLOAT", k[k.INT = 1] = "INT", k[k.UINT = 2] = "UINT", (B = F || (F = {}))[B.NEAREST = 0] = "NEAREST", B[B.LINEAR = 1] = "LINEAR", (j = D || (D = {}))[j.CLAMP = 33071] = "CLAMP", j[j.REPEAT = 10497] = "REPEAT", j[j.MIRRORED_REPEAT = 33648] = "MIRRORED_REPEAT", (W = G || (G = {}))[W.OFF = 0] = "OFF", W[W.POW2 = 1] = "POW2", W[W.ON = 2] = "ON", W[W.ON_MANUAL = 3] = "ON_MANUAL", (X = H || (H = {}))[X.NPM = 0] = "NPM", X[X.UNPACK = 1] = "UNPACK", X[X.PMA = 2] = "PMA", X[X.NO_PREMULTIPLIED_ALPHA = 0] = "NO_PREMULTIPLIED_ALPHA", X[X.PREMULTIPLY_ON_UPLOAD = 1] = "PREMULTIPLY_ON_UPLOAD", X[X.PREMULTIPLY_ALPHA = 2] = "PREMULTIPLY_ALPHA", X[X.PREMULTIPLIED_ALPHA = 2] = "PREMULTIPLIED_ALPHA", ($ = V || (V = {}))[$.NO = 0] = "NO", $[$.YES = 1] = "YES", $[$.AUTO = 2] = "AUTO", $[$.BLEND = 0] = "BLEND", $[$.CLEAR = 1] = "CLEAR", $[$.BLIT = 2] = "BLIT", (z = Y || (Y = {}))[z.AUTO = 0] = "AUTO", z[z.MANUAL = 1] = "MANUAL", (q = K || (K = {})).LOW = "lowp", q.MEDIUM = "mediump", q.HIGH = "highp", (J = Z || (Z = {}))[J.NONE = 0] = "NONE", J[J.SCISSOR = 1] = "SCISSOR", J[J.STENCIL = 2] = "STENCIL", J[J.SPRITE = 3] = "SPRITE", (tt = Q || (Q = {}))[tt.NONE = 0] = "NONE", tt[tt.LOW = 2] = "LOW", tt[tt.MEDIUM = 4] = "MEDIUM", tt[tt.HIGH = 8] = "HIGH", (nt = it || (it = {}))[nt.ELEMENT_ARRAY_BUFFER = 34963] = "ELEMENT_ARRAY_BUFFER", nt[nt.ARRAY_BUFFER = 34962] = "ARRAY_BUFFER", nt[nt.UNIFORM_BUFFER = 35345] = "UNIFORM_BUFFER"; var et = { MIPMAP_TEXTURES: G.POW2, ANISOTROPIC_LEVEL: 0, RESOLUTION: 1, FILTER_RESOLUTION: 1, FILTER_MULTISAMPLE: Q.NONE, SPRITE_MAX_TEXTURES: function(t) { var i = !0; if (st.tablet || st.phone) { var n; if (st.apple.device) if (n = navigator.userAgent.match(/OS (\d+)_(\d+)?/)) parseInt(n[1], 10) < 11 && (i = !1); if (st.android.device) if (n = navigator.userAgent.match(/Android\s([0-9.]*)/)) parseInt(n[1], 10) < 7 && (i = !1) } return i ? t : 4 }(32), SPRITE_BATCH_SIZE: 4096, RENDER_OPTIONS: { view: null, antialias: !1, autoDensity: !1, backgroundColor: 0, backgroundAlpha: 1, useContextAlpha: !0, clearBeforeRender: !0, preserveDrawingBuffer: !1, width: 800, height: 600, legacy: !1 }, GC_MODE: Y.AUTO, GC_MAX_IDLE: 3600, GC_MAX_CHECK_COUNT: 600, WRAP_MODE: D.CLAMP, SCALE_MODE: F.LINEAR, PRECISION_VERTEX: K.HIGH, PRECISION_FRAGMENT: st.apple.device ? K.HIGH : K.MEDIUM, CAN_UPLOAD_SAME_BUFFER: !st.apple.device, CREATE_IMAGE_BITMAP: !1, ROUND_PIXELS: !1 } }, 5849: (t, i, n) => { "use strict"; n.d(i, { j: () => f }); var s = n(4936), e = n(4577), r = n(6480), h = n(229), o = n(3930), u = n(6335), a = function(t, i) { return (a = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]) })(t, i) }; var l = new h.E9, c = new Uint16Array([0, 1, 2, 0, 2, 3]), f = function(t) { function i(i) { var n = t.call(this) || this; return n.ur = new h.AB(n.ar, n, i ? i.defaultAnchor.x : 0, i ? i.defaultAnchor.y : 0), n.Ft = null, n.$ = 0, n.J = 0, n.ln = null, n.xi = null, n.tint = 16777215, n.blendMode = s.T$.NORMAL, n.lr = 16777215, n.uvs = null, n.texture = i || e.xE.EMPTY, n.vertexData = new Float32Array(8), n.vertexTrimmedData = null, n.an = -1, n.Kt = -1, n.cr = -1, n.vr = -1, n.indices = c, n.pluginName = "batch", n.isSprite = !0, n.Fe = o.X.ROUND_PIXELS, n } return function(t, i) { function n() { this.constructor = t } a(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) }(i, t), i.prototype.dr = function() { this.Kt = -1, this.vr = -1, this.lr = 16777215, this.$ && (this.scale.x = (0, u.sign)(this.scale.x) * this.$ / this.Ft.orig.width), this.J && (this.scale.y = (0, u.sign)(this.scale.y) * this.J / this.Ft.orig.height) }, i.prototype.ar = function() { this.an = -1, this.cr = -1 }, i.prototype.calculateVertices = function() { var t = this.Ft; if (this.an !== this.transform.L || this.Kt !== t.Pt) { this.Kt !== t.Pt && (this.uvs = this.Ft._.uvsFloat32), this.an = this.transform.L, this.Kt = t.Pt; var i = this.transform.worldTransform, n = i.a, s = i.b, e = i.c, r = i.d, h = i.tx, u = i.ty, a = this.vertexData, l = t.trim, c = t.orig, f = this.ur, v = 0, d = 0, _ = 0, p = 0; if (l ? (v = (d = l.x - f.pe * c.width) + l.width, _ = (p = l.y - f.me * c.height) + l.height) : (v = (d = -f.pe * c.width) + c.width, _ = (p = -f.me * c.height) + c.height), a[0] = n * d + e * p + h, a[1] = r * p + s * d + u, a[2] = n * v + e * p + h, a[3] = r * p + s * v + u, a[4] = n * v + e * _ + h, a[5] = r * _ + s * v + u, a[6] = n * d + e * _ + h, a[7] = r * _ + s * d + u, this.Fe) for (var m = o.X.RESOLUTION, b = 0; b < a.length; ++b) a[b] = Math.round((a[b] * m | 0) / m) } }, i.prototype.calculateTrimmedVertices = function() { if (this.vertexTrimmedData) { if (this.cr === this.transform.L && this.vr === this.Ft.Pt) return } else this.vertexTrimmedData = new Float32Array(8); this.cr = this.transform.L, this.vr = this.Ft.Pt; var t = this.vertexTrimmedData, i = this.Ft.orig, n = this.ur, s = this.transform.worldTransform, e = s.a, r = s.b, h = s.c, o = s.d, u = s.tx, a = s.ty, l = -n.pe * i.width, c = l + i.width, f = -n.me * i.height, v = f + i.height; t[0] = e * l + h * f + u, t[1] = o * f + r * l + a, t[2] = e * c + h * f + u, t[3] = o * f + r * c + a, t[4] = e * c + h * v + u, t[5] = o * v + r * c + a, t[6] = e * l + h * v + u, t[7] = o * v + r * l + a }, i.prototype.Ki = function(t) { this.calculateVertices(), t.batch.setObjectRenderer(t.plugins[this.pluginName]), t.plugins[this.pluginName].render(this) }, i.prototype.$i = function() { var t = this.Ft.trim, i = this.Ft.orig; !t || t.width === i.width && t.height === i.height ? (this.calculateVertices(), this.ki.addQuad(this.vertexData)) : (this.calculateTrimmedVertices(), this.ki.addQuad(this.vertexTrimmedData)) }, i.prototype.getLocalBounds = function(i) { return 0 === this.children.length ? (this.Fi || (this.Fi = new r.YZ), this.Fi.minX = this.Ft.orig.width * -this.ur.pe, this.Fi.minY = this.Ft.orig.height * -this.ur.me, this.Fi.maxX = this.Ft.orig.width * (1 - this.ur.pe), this.Fi.maxY = this.Ft.orig.height * (1 - this.ur.me), i || (this.ji || (this.ji = new h.Ae), i = this.ji), this.Fi.getRectangle(i)) : t.prototype.getLocalBounds.call(this, i) }, i.prototype.containsPoint = function(t) { this.worldTransform.applyInverse(t, l); var i = this.Ft.orig.width, n = this.Ft.orig.height, s = -i * this.anchor.x, e = 0; return l.x >= s && l.x < s + i && l.y >= (e = -n * this.anchor.y) && l.y < e + n }, i.prototype.destroy = function(i) { (t.prototype.destroy.call(this, i), this.Ft.off("update", this.dr, this), this.ur = null, "boolean" == typeof i ? i : i && i.texture) && this.Ft.destroy(!!("boolean" == typeof i ? i : i && i.baseTexture)); this.Ft = null }, i.from = function(t, n) { return new i(t instanceof e.xE ? t : e.xE.from(t, n)) }, Object.defineProperty(i.prototype, "roundPixels", { get: function() { return this.Fe }, set: function(t) { this.Fe !== t && (this.an = -1), this.Fe = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "width", { get: function() { return Math.abs(this.scale.x) * this.Ft.orig.width }, set: function(t) { var i = (0, u.sign)(this.scale.x) || 1; this.scale.x = i * t / this.Ft.orig.width, this.$ = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "height", { get: function() { return Math.abs(this.scale.y) * this.Ft.orig.height }, set: function(t) { var i = (0, u.sign)(this.scale.y) || 1; this.scale.y = i * t / this.Ft.orig.height, this.J = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "anchor", { get: function() { return this.ur }, set: function(t) { this.ur.copyFrom(t) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "tint", { get: function() { return this.ln }, set: function(t) { this.ln = t, this.xi = (t >> 16) + (65280 & t) + ((255 & t) << 16) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "texture", { get: function() { return this.Ft }, set: function(t) { this.Ft !== t && (this.Ft && this.Ft.off("update", this.dr, this), this.Ft = t || e.xE.EMPTY, this.lr = 16777215, this.Kt = -1, this.vr = -1, t && (t.baseTexture.valid ? this.dr() : t.once("update", this.dr, this))) }, enumerable: !1, configurable: !0 }), i }(r.W2) }, 4258: (t, i, n) => { "use strict"; n.d(i, { c: () => o, o: () => u }); var s = n(229), e = n(4577), r = n(6335), h = n(1735), o = function() { function t(t, i, n) { void 0 === n && (n = null), this.Ft = t instanceof e.xE ? t : null, this.baseTexture = t instanceof e.VL ? t : this.Ft.baseTexture, this.textures = {}, this.animations = {}, this.data = i; var s = this.baseTexture.resource; this.resolution = this._r(n || (s ? s.url : null)), this.pr = this.data.frames, this.br = Object.keys(this.pr), this.wr = 0, this.gr = null } return t.prototype._r = function(t) { void 0 === t && (t = null); var i = this.data.meta.scale, n = (0, r.getResolutionOfUrl)(t, null); return null === n && (n = void 0 !== i ? parseFloat(i) : 1), 1 !== n && this.baseTexture.setResolution(n), n }, t.prototype.parse = function(i) { this.wr = 0, this.gr = i, this.br.length <= t.BATCH_SIZE ? (this.yr(0), this.Er(), this.Sr()) : this.Ar() }, t.prototype.yr = function(i) { for (var n = i, r = t.BATCH_SIZE; n - i < r && n < this.br.length;) { var h = this.br[n], o = this.pr[h], u = o.frame; if (u) { var a = null, l = null, c = !1 !== o.trimmed && o.sourceSize ? o.sourceSize : o.frame, f = new s.Ae(0, 0, Math.floor(c.w) / this.resolution, Math.floor(c.h) / this.resolution); a = o.rotated ? new s.Ae(Math.floor(u.x) / this.resolution, Math.floor(u.y) / this.resolution, Math.floor(u.h) / this.resolution, Math.floor(u.w) / this.resolution) : new s.Ae(Math.floor(u.x) / this.resolution, Math.floor(u.y) / this.resolution, Math.floor(u.w) / this.resolution, Math.floor(u.h) / this.resolution), !1 !== o.trimmed && o.spriteSourceSize && (l = new s.Ae(Math.floor(o.spriteSourceSize.x) / this.resolution, Math.floor(o.spriteSourceSize.y) / this.resolution, Math.floor(u.w) / this.resolution, Math.floor(u.h) / this.resolution)), this.textures[h] = new e.xE(this.baseTexture, a, f, l, o.rotated ? 2 : 0, o.anchor), e.xE.addToCache(this.textures[h], h) } n++ } }, t.prototype.Er = function() { var t = this.data.animations || {}; for (var i in t) { this.animations[i] = []; for (var n = 0; n < t[i].length; n++) { this.animations[i].push(this.textures[t[i][n]]) } } }, t.prototype.Sr = function() { var t = this.gr; this.gr = null, this.wr = 0, t.call(this, this.textures) }, t.prototype.Ar = function() { var i = this; this.yr(this.wr * t.BATCH_SIZE), this.wr++, setTimeout((function() { i.wr * t.BATCH_SIZE < i.br.length ? i.Ar() : (i.Er(), i.Sr()) }), 0) }, t.prototype.destroy = function(t) { var i; for (var n in void 0 === t && (t = !1), this.textures) this.textures[n].destroy(); this.pr = null, this.br = null, this.data = null, this.textures = null, t && (null === (i = this.Ft) || void 0 === i || i.destroy(), this.baseTexture.destroy()), this.Ft = null, this.baseTexture = null }, t.BATCH_SIZE = 1e3, t }(), u = function() { function t() {} return t.use = function(i, n) { var s, e, u = this, a = i.name + "_image"; if (i.data && i.type === h.kC.TYPE.JSON && i.data.frames && !u.resources[a]) { var l = null === (e = null === (s = i.data) || void 0 === s ? void 0 : s.meta) || void 0 === e ? void 0 : e.related_multi_packs; if (Array.isArray(l)) for (var c = function(t) { if ("string" != typeof t) return "continue"; var n = t.replace(".json", ""), s = r.url.resolve(i.url.replace(u.baseUrl, ""), t); if (u.resources[n] || Object.values(u.resources).some((function(t) { return r.url.format(r.url.parse(t.url)) === s }))) return "continue"; u.add(n, s, { crossOrigin: i.crossOrigin, loadType: h.kC.LOAD_TYPE.XHR, xhrType: h.kC.XHR_RESPONSE_TYPE.JSON, parentResource: i, metadata: i.metadata }) }, f = 0, v = l; f < v.length; f++) { c(v[f]) } var d = { crossOrigin: i.crossOrigin, metadata: i.metadata.imageMetadata, parentResource: i }, _ = t.getResourcePath(i, u.baseUrl); u.add(a, _, d, (function(t) { if (t.error) n(t.error); else { var s = new o(t.texture, i.data, i.url); s.parse((function() { i.spritesheet = s, i.textures = s.textures, n() })) } })) } else n() }, t.getResourcePath = function(t, i) { return t.isDataUrl ? t.data.meta.image : r.url.resolve(t.url.replace(i, ""), t.data.meta.image) }, t }() }, 4431: (t, i, n) => { "use strict"; n.d(i, { Xz: () => M, vl: () => O }); var s = n(229), e = n(3930), r = n(3168), h = n(6335), o = n(4577), u = n(6359), a = n(4936), l = n(6480), c = n(1735), f = function(t, i) { return (f = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]) })(t, i) }; var v = function() { this.info = [], this.common = [], this.page = [], this.char = [], this.kerning = [], this.distanceField = [] }, d = function() { function t() {} return t.test = function(t) { return "string" == typeof t && 0 === t.indexOf("info face=") }, t.parse = function(t) { var i = t.match(/^[a-z]+\s+.+$/gm), n = { info: [], common: [], page: [], char: [], chars: [], kerning: [], kernings: [], distanceField: [] }; for (var s in i) { var e = i[s].match(/^[a-z]+/gm)[0], r = i[s].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm), h = {}; for (var o in r) { var u = r[o].split("="), a = u[0], l = u[1].replace(/"/gm, ""), c = parseFloat(l), f = isNaN(c) ? l : c; h[a] = f } n[e].push(h) } var d = new v; return n.info.forEach((function(t) { return d.info.push({ face: t.face, size: parseInt(t.size, 10) }) })), n.common.forEach((function(t) { return d.common.push({ lineHeight: parseInt(t.lineHeight, 10) }) })), n.page.forEach((function(t) { return d.page.push({ id: parseInt(t.id, 10), file: t.file }) })), n.char.forEach((function(t) { return d.char.push({ id: parseInt(t.id, 10), page: parseInt(t.page, 10), x: parseInt(t.x, 10), y: parseInt(t.y, 10), width: parseInt(t.width, 10), height: parseInt(t.height, 10), xoffset: parseInt(t.xoffset, 10), yoffset: parseInt(t.yoffset, 10), xadvance: parseInt(t.xadvance, 10) }) })), n.kerning.forEach((function(t) { return d.kerning.push({ first: parseInt(t.first, 10), second: parseInt(t.second, 10), amount: parseInt(t.amount, 10) }) })), n.distanceField.forEach((function(t) { return d.distanceField.push({ distanceRange: parseInt(t.distanceRange, 10), fieldType: t.fieldType }) })), d }, t }(), _ = function() { function t() {} return t.test = function(t) { return t instanceof XMLDocument && t.getElementsByTagName("page").length && null !== t.getElementsByTagName("info")[0].getAttribute("face") }, t.parse = function(t) { for (var i = new v, n = t.getElementsByTagName("info"), s = t.getElementsByTagName("common"), e = t.getElementsByTagName("page"), r = t.getElementsByTagName("char"), h = t.getElementsByTagName("kerning"), o = t.getElementsByTagName("distanceField"), u = 0; u < n.length; u++) i.info.push({ face: n[u].getAttribute("face"), size: parseInt(n[u].getAttribute("size"), 10) }); for (u = 0; u < s.length; u++) i.common.push({ lineHeight: parseInt(s[u].getAttribute("lineHeight"), 10) }); for (u = 0; u < e.length; u++) i.page.push({ id: parseInt(e[u].getAttribute("id"), 10) || 0, file: e[u].getAttribute("file") }); for (u = 0; u < r.length; u++) { var a = r[u]; i.char.push({ id: parseInt(a.getAttribute("id"), 10), page: parseInt(a.getAttribute("page"), 10) || 0, x: parseInt(a.getAttribute("x"), 10), y: parseInt(a.getAttribute("y"), 10), width: parseInt(a.getAttribute("width"), 10), height: parseInt(a.getAttribute("height"), 10), xoffset: parseInt(a.getAttribute("xoffset"), 10), yoffset: parseInt(a.getAttribute("yoffset"), 10), xadvance: parseInt(a.getAttribute("xadvance"), 10) }) } for (u = 0; u < h.length; u++) i.kerning.push({ first: parseInt(h[u].getAttribute("first"), 10), second: parseInt(h[u].getAttribute("second"), 10), amount: parseInt(h[u].getAttribute("amount"), 10) }); for (u = 0; u < o.length; u++) i.distanceField.push({ fieldType: o[u].getAttribute("fieldType"), distanceRange: parseInt(o[u].getAttribute("distanceRange"), 10) }); return i }, t }(), p = function() { function t() {} return t.test = function(t) { if ("string" == typeof t && t.indexOf("") > -1) { var i = (new globalThis.DOMParser).parseFromString(t, "text/xml"); return _.test(i) } return !1 }, t.parse = function(t) { var i = (new globalThis.DOMParser).parseFromString(t, "text/xml"); return _.parse(i) }, t }(), m = [d, _, p]; function b(t) { for (var i = 0; i < m.length; i++) if (m[i].test(t)) return m[i]; return null } function w(t, i, n, s, e, r, o) { var a = n.text, l = n.fontProperties; i.translate(s, e), i.scale(r, r); var c = o.strokeThickness / 2, f = -o.strokeThickness / 2; if (i.font = o.toFontString(), i.lineWidth = o.strokeThickness, i.textBaseline = o.textBaseline, i.lineJoin = o.lineJoin, i.miterLimit = o.miterLimit, i.fillStyle = function(t, i, n, s, e, r) { var h, o = n.fill; if (!Array.isArray(o)) return o; if (1 === o.length) return o[0]; var a = n.dropShadow ? n.dropShadowDistance : 0, l = n.padding || 0, c = t.width / s - a - 2 * l, f = t.height / s - a - 2 * l, v = o.slice(), d = n.fillGradientStops.slice(); if (!d.length) for (var _ = v.length + 1, p = 1; p < _; ++p) d.push(p / _); if (v.unshift(o[0]), d.unshift(0), v.push(o[o.length - 1]), d.push(1), n.fillGradientType === u.M_.LINEAR_VERTICAL) { h = i.createLinearGradient(c / 2, l, c / 2, f + l); var m = 0, b = (r.fontProperties.fontSize + n.strokeThickness) / f; for (p = 0; p < e.length; p++) for (var w = r.lineHeight * p, g = 0; g < v.length; g++) { var y = Math.max(m, w / f + ("number" == typeof d[g] ? d[g] : g / v.length) * b); y = Math.min(y, 1), h.addColorStop(y, v[g]), m = y } } else { h = i.createLinearGradient(l, f / 2, c + l, f / 2); var E = v.length + 1, S = 1; for (p = 0; p < v.length; p++) h.addColorStop("number" == typeof d[p] ? d[p] : S / E, v[p]), S++ } return h }(t, i, o, r, [a], n), i.strokeStyle = o.stroke, o.dropShadow) { var v = o.dropShadowColor, d = (0, h.hex2rgb)("number" == typeof v ? v : (0, h.string2hex)(v)), _ = o.dropShadowBlur * r, p = o.dropShadowDistance * r; i.shadowColor = "rgba(" + 255 * d[0] + "," + 255 * d[1] + "," + 255 * d[2] + "," + o.dropShadowAlpha + ")", i.shadowBlur = _, i.shadowOffsetX = Math.cos(o.dropShadowAngle) * p, i.shadowOffsetY = Math.sin(o.dropShadowAngle) * p } else i.shadowColor = "black", i.shadowBlur = 0, i.shadowOffsetX = 0, i.shadowOffsetY = 0; o.stroke && o.strokeThickness && i.strokeText(a, c, f + n.lineHeight - l.descent), o.fill && i.fillText(a, c, f + n.lineHeight - l.descent), i.setTransform(1, 0, 0, 1, 0, 0), i.fillStyle = "rgba(0, 0, 0, 0)" } function g(t) { return Array.from ? Array.from(t) : t.split("") } function y(t) { return t.codePointAt ? t.codePointAt(0) : t.charCodeAt(0) } var E = function() { function t(t, i, n) { var e, r, u = t.info[0], l = t.common[0], c = t.distanceField[0], f = (0, h.getResolutionOfUrl)(t.page[0].file), v = {}; this.Tr = n, this.font = u.face, this.size = u.size, this.lineHeight = l.lineHeight / f, this.chars = {}, this.pageTextures = v; for (var d = 0; d < t.page.length; d++) { var _ = t.page[d]; v[m = _.id] = i instanceof Array ? i[d] : i[_.file], (null == c ? void 0 : c.fieldType) && "none" !== c.fieldType && (v[m].baseTexture.alphaMode = a.iw.NO_PREMULTIPLIED_ALPHA) } for (d = 0; d < t.char.length; d++) { var p = t.char[d], m = p.id, b = p.page, w = t.char[d], g = w.x, y = w.y, E = w.width, S = w.height, A = w.xoffset, T = w.yoffset, M = w.xadvance; A /= f, T /= f, M /= f; var O = new s.Ae((g /= f) + v[b].frame.x / f, (y /= f) + v[b].frame.y / f, E /= f, S /= f); this.chars[m] = { xOffset: A, yOffset: T, xAdvance: M, kerning: {}, texture: new o.xE(v[b].baseTexture, O), page: b } } for (d = 0; d < t.kerning.length; d++) { var I = t.kerning[d], N = I.first, R = I.second, P = I.amount; N /= f, P /= f, this.chars[R /= f] && (this.chars[R].kerning[N] = P) } this.distanceFieldRange = null == c ? void 0 : c.distanceRange, this.distanceFieldType = null !== (r = null === (e = null == c ? void 0 : c.fieldType) || void 0 === e ? void 0 : e.toLowerCase()) && void 0 !== r ? r : "none" } return t.prototype.destroy = function() { for (var t in this.chars) this.chars[t].texture.destroy(), this.chars[t].texture = null; for (var t in this.pageTextures) this.Tr && this.pageTextures[t].destroy(!0), this.pageTextures[t] = null; this.chars = null, this.pageTextures = null }, t.install = function(i, n, s) { var e; if (i instanceof v) e = i; else { var r = b(i); if (!r) throw new Error("Unrecognized data format for font."); e = r.parse(i) } n instanceof o.xE && (n = [n]); var h = new t(e, n, s); return t.available[h.font] = h, h }, t.uninstall = function(i) { var n = t.available[i]; if (!n) throw new Error("No font found named '" + i + "'"); n.destroy(), delete t.available[i] }, t.from = function(i, n, s) { if (!i) throw new Error("[BitmapFont] Property `name` is required."); var e = Object.assign({}, t.defaultOptions, s), r = e.padding, h = e.resolution, a = e.textureWidth, l = e.textureHeight, c = function(t) { "string" == typeof t && (t = [t]); for (var i = [], n = 0, s = t.length; n < s; n++) { var e = t[n]; if (Array.isArray(e)) { if (2 !== e.length) throw new Error("[BitmapFont]: Invalid character range length, expecting 2 got " + e.length + "."); var r = e[0].charCodeAt(0), h = e[1].charCodeAt(0); if (h < r) throw new Error("[BitmapFont]: Invalid character range."); for (var o = r, u = h; o <= u; o++) i.push(String.fromCharCode(o)) } else i.push.apply(i, g(e)) } if (0 === i.length) throw new Error("[BitmapFont]: Empty set when resolving characters."); return i }(e.chars), f = n instanceof u.pn ? n : new u.pn(n), d = a, _ = new v; _.info[0] = { face: f.fontFamily, size: f.fontSize }, _.common[0] = { lineHeight: f.fontSize }; for (var p, m, b, E = 0, S = 0, A = 0, T = [], M = 0; M < c.length; M++) { p || ((p = document.createElement("canvas")).width = a, p.height = l, m = p.getContext("2d"), b = new o.VL(p, { resolution: h }), T.push(new o.xE(b)), _.page.push({ id: T.length - 1, file: "" })); var O = u.Mr.measureText(c[M], f, !1, p), I = O.width, N = Math.ceil(O.height), R = Math.ceil(("italic" === f.fontStyle ? 2 : 1) * I); if (S >= l - N * h) { if (0 === S) throw new Error("[BitmapFont] textureHeight " + l + "px is too small for " + f.fontSize + "px fonts"); --M, p = null, m = null, b = null, S = 0, E = 0, A = 0 } else if (A = Math.max(N + O.fontProperties.descent, A), R * h + E >= d) --M, S += A * h, S = Math.ceil(S), E = 0, A = 0; else { w(p, m, O, E, S, h, f); var P = y(O.text); _.char.push({ id: P, page: T.length - 1, x: E / h, y: S / h, width: R, height: N, xoffset: 0, yoffset: 0, xadvance: Math.ceil(I - (f.dropShadow ? f.dropShadowDistance : 0) - (f.stroke ? f.strokeThickness : 0)) }), E += (R + 2 * r) * h, E = Math.ceil(E) } } M = 0; for (var x = c.length; M < x; M++) for (var L = c[M], C = 0; C < x; C++) { var U = c[C], k = m.measureText(L).width, F = m.measureText(U).width, B = m.measureText(L + U).width - (k + F); B && _.kerning.push({ first: y(L), second: y(U), amount: B }) } var D = new t(_, T, !0); return void 0 !== t.available[i] && t.uninstall(i), t.available[i] = D, D }, t.ALPHA = [ ["a", "z"], ["A", "Z"], " " ], t.NUMERIC = [ ["0", "9"] ], t.ALPHANUMERIC = [ ["a", "z"], ["A", "Z"], ["0", "9"], " " ], t.ASCII = [ [" ", "~"] ], t.defaultOptions = { resolution: 1, textureWidth: 512, textureHeight: 512, padding: 4, chars: t.ALPHANUMERIC }, t.available = {}, t }(), S = [], A = [], T = [], M = function(t) { function i(n, r) { void 0 === r && (r = {}); var h = t.call(this) || this; h.ln = 16777215; var o = Object.assign({}, i.styleDefaults, r), u = o.align, a = o.tint, l = o.maxWidth, c = o.letterSpacing, f = o.fontName, v = o.fontSize; if (!E.available[f]) throw new Error('Missing BitmapFont "' + f + '"'); return h.Or = [], h.Ir = 0, h.Nr = 0, h.Rr = u, h.ln = a, h.Pr = f, h.Lr = v || E.available[f].size, h.text = n, h.Cr = l, h.Ur = 0, h.kr = c, h.ur = new s.AB((function() { h.dirty = !0 }), h, 0, 0), h.Fe = e.X.ROUND_PIXELS, h.dirty = !0, h.Fr = {}, h } return function(t, i) { function n() { this.constructor = t } f(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) }(i, t), i.prototype.updateText = function() { for (var t, i = E.available[this.Pr], n = this.Lr / i.size, e = new s.E9, u = [], l = [], c = [], f = g(this.Br.replace(/(?:\r\n|\r)/g, "\n") || " "), v = this.Cr * i.size / this.Lr, d = "none" === i.distanceFieldType ? S : A, _ = null, p = 0, m = 0, b = 0, w = -1, M = 0, O = 0, I = 0, N = 0, R = 0; R < f.length; R++) { var P = y(q = f[R]); if (/(?:\s)/.test(q) && (w = R, M = p, N++), "\r" !== q && "\n" !== q) { var x = i.chars[P]; if (x) { _ && x.kerning[_] && (e.x += x.kerning[_]); var L = T.pop() || { texture: o.xE.EMPTY, line: 0, charCode: 0, prevSpaces: 0, position: new s.E9 }; L.texture = x.texture, L.line = b, L.charCode = P, L.position.x = e.x + x.xOffset + this.kr / 2, L.position.y = e.y + x.yOffset, L.prevSpaces = N, u.push(L), p = L.position.x + Math.max(x.xAdvance, x.texture.orig.width), e.x += x.xAdvance + this.kr, I = Math.max(I, x.yOffset + x.texture.height), _ = P, -1 !== w && v > 0 && e.x > v && (++O, (0, h.removeItems)(u, 1 + w - O, 1 + R - w), R = w, w = -1, l.push(M), c.push(u.length > 0 ? u[u.length - 1].prevSpaces : 0), m = Math.max(m, M), b++, e.x = 0, e.y += i.lineHeight, _ = null, N = 0) } } else l.push(p), c.push(-1), m = Math.max(m, p), ++b, ++O, e.x = 0, e.y += i.lineHeight, _ = null, N = 0 } var C = f[f.length - 1]; "\r" !== C && "\n" !== C && (/(?:\s)/.test(C) && (p = M), l.push(p), m = Math.max(m, p), c.push(-1)); var U = []; for (R = 0; R <= b; R++) { var k = 0; "right" === this.Rr ? k = m - l[R] : "center" === this.Rr ? k = (m - l[R]) / 2 : "justify" === this.Rr && (k = c[R] < 0 ? 0 : (m - l[R]) / c[R]), U.push(k) } var F = u.length, B = {}, D = [], j = this.Or; for (R = 0; R < j.length; R++) d.push(j[R]); for (R = 0; R < F; R++) { var G = (J = u[R].texture).baseTexture.uid; if (!B[G]) { if (!(rt = d.pop())) { var W = new r.xc, H = void 0, X = void 0; "none" === i.distanceFieldType ? (H = new r.rY(o.xE.EMPTY), X = a.T$.NORMAL) : (H = new r.rY(o.xE.EMPTY, { program: o.$r.from("// Mesh material default fragment\r\nattribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 translationMatrix;\r\nuniform mat3 uTextureMatrix;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r\n}\r\n", "// Pixi texture info\r\nvarying vec2 vTextureCoord;\r\nuniform sampler2D uSampler;\r\n\r\n// Tint\r\nuniform vec4 uColor;\r\n\r\n// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\r\nuniform float uFWidth;\r\n\r\nvoid main(void) {\r\n\r\n // To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\r\n vec4 texColor = texture2D(uSampler, vTextureCoord);\r\n\r\n // MSDF\r\n float median = texColor.r + texColor.g + texColor.b -\r\n min(texColor.r, min(texColor.g, texColor.b)) -\r\n max(texColor.r, max(texColor.g, texColor.b));\r\n // SDF\r\n median = min(median, texColor.a);\r\n\r\n float screenPxDistance = uFWidth * (median - 0.5);\r\n float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\r\n\r\n // NPM Textures, NPM outputs\r\n gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);\r\n\r\n}\r\n"), uniforms: { uFWidth: 0 } }), X = a.T$.NORMAL_NPM); var V = new r.Kj(W, H); V.blendMode = X, rt = { index: 0, indexCount: 0, vertexCount: 0, uvsCount: 0, total: 0, mesh: V, vertices: null, uvs: null, indices: null } } rt.index = 0, rt.indexCount = 0, rt.vertexCount = 0, rt.uvsCount = 0, rt.total = 0; var $ = this.Fr; $[G] = $[G] || new o.xE(J.baseTexture), rt.mesh.texture = $[G], rt.mesh.tint = this.ln, D.push(rt), B[G] = rt } B[G].total++ } for (R = 0; R < j.length; R++) - 1 === D.indexOf(j[R]) && this.removeChild(j[R].mesh); for (R = 0; R < D.length; R++) D[R].mesh.parent !== this && this.addChild(D[R].mesh); for (var R in this.Or = D, B) { var Y = (rt = B[R]).total; if (!((null === (t = rt.indices) || void 0 === t ? void 0 : t.length) > 6 * Y) || rt.vertices.length < 2 * r.Kj.BATCHABLE_SIZE) rt.vertices = new Float32Array(8 * Y), rt.uvs = new Float32Array(8 * Y), rt.indices = new Uint16Array(6 * Y); else for (var z = rt.vertices, K = 4 * rt.total * 2; K < z.length; K++) z[K] = 0; rt.mesh.size = 6 * Y } for (R = 0; R < F; R++) { var q, Z = (q = u[R]).position.x + U[q.line] * ("justify" === this.Rr ? q.prevSpaces : 1); this.Fe && (Z = Math.round(Z)); var J, Q = Z * n, tt = q.position.y * n, it = B[(J = q.texture).baseTexture.uid], nt = J.frame, st = J._, et = it.index++; it.indices[6 * et + 0] = 0 + 4 * et, it.indices[6 * et + 1] = 1 + 4 * et, it.indices[6 * et + 2] = 2 + 4 * et, it.indices[6 * et + 3] = 0 + 4 * et, it.indices[6 * et + 4] = 2 + 4 * et, it.indices[6 * et + 5] = 3 + 4 * et, it.vertices[8 * et + 0] = Q, it.vertices[8 * et + 1] = tt, it.vertices[8 * et + 2] = Q + nt.width * n, it.vertices[8 * et + 3] = tt, it.vertices[8 * et + 4] = Q + nt.width * n, it.vertices[8 * et + 5] = tt + nt.height * n, it.vertices[8 * et + 6] = Q, it.vertices[8 * et + 7] = tt + nt.height * n, it.uvs[8 * et + 0] = st.x0, it.uvs[8 * et + 1] = st.y0, it.uvs[8 * et + 2] = st.x1, it.uvs[8 * et + 3] = st.y1, it.uvs[8 * et + 4] = st.x2, it.uvs[8 * et + 5] = st.y2, it.uvs[8 * et + 6] = st.x3, it.uvs[8 * et + 7] = st.y3 } for (var R in this.Ir = m * n, this.Nr = (e.y + i.lineHeight) * n, B) { var rt = B[R]; if (0 !== this.anchor.x || 0 !== this.anchor.y) for (var ht = 0, ot = this.Ir * this.anchor.x, ut = this.Nr * this.anchor.y, at = 0; at < rt.total; at++) rt.vertices[ht++] -= ot, rt.vertices[ht++] -= ut, rt.vertices[ht++] -= ot, rt.vertices[ht++] -= ut, rt.vertices[ht++] -= ot, rt.vertices[ht++] -= ut, rt.vertices[ht++] -= ot, rt.vertices[ht++] -= ut; this.Ur = I * n; var lt = rt.mesh.geometry.getBuffer("aVertexPosition"), ct = rt.mesh.geometry.getBuffer("aTextureCoord"), ft = rt.mesh.geometry.getIndex(); lt.data = rt.vertices, ct.data = rt.uvs, ft.data = rt.indices, lt.update(), ct.update(), ft.update() } for (R = 0; R < u.length; R++) T.push(u[R]) }, i.prototype.updateTransform = function() { this.validate(), this.containerUpdateTransform() }, i.prototype.Ki = function(i) { var n = E.available[this.Pr], s = n.distanceFieldRange, e = n.size; if ("none" !== n.distanceFieldType) for (var r = this.worldTransform, h = r.a, o = r.b, u = r.c, a = r.d, l = Math.sqrt(h * h + o * o), c = Math.sqrt(u * u + a * a), f = (Math.abs(l) + Math.abs(c)) / 2, v = this.Lr / e, d = 0, _ = this.Or; d < _.length; d++) { _[d].mesh.shader.uniforms.uFWidth = f * s * v * i.resolution } t.prototype.Ki.call(this, i) }, i.prototype.getLocalBounds = function() { return this.validate(), t.prototype.getLocalBounds.call(this) }, i.prototype.validate = function() { this.dirty && (this.updateText(), this.dirty = !1) }, Object.defineProperty(i.prototype, "tint", { get: function() { return this.ln }, set: function(t) { if (this.ln !== t) { this.ln = t; for (var i = 0; i < this.Or.length; i++) this.Or[i].mesh.tint = t } }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "align", { get: function() { return this.Rr }, set: function(t) { this.Rr !== t && (this.Rr = t, this.dirty = !0) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "fontName", { get: function() { return this.Pr }, set: function(t) { if (!E.available[t]) throw new Error('Missing BitmapFont "' + t + '"'); this.Pr !== t && (this.Pr = t, this.dirty = !0) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "fontSize", { get: function() { return this.Lr }, set: function(t) { this.Lr !== t && (this.Lr = t, this.dirty = !0) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "anchor", { get: function() { return this.ur }, set: function(t) { "number" == typeof t ? this.ur.set(t) : this.ur.copyFrom(t) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "text", { get: function() { return this.Br }, set: function(t) { t = String(null == t ? "" : t), this.Br !== t && (this.Br = t, this.dirty = !0) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "maxWidth", { get: function() { return this.Cr }, set: function(t) { this.Cr !== t && (this.Cr = t, this.dirty = !0) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "maxLineHeight", { get: function() { return this.validate(), this.Ur }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "textWidth", { get: function() { return this.validate(), this.Ir }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "letterSpacing", { get: function() { return this.kr }, set: function(t) { this.kr !== t && (this.kr = t, this.dirty = !0) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "roundPixels", { get: function() { return this.Fe }, set: function(t) { t !== this.Fe && (this.Fe = t, this.dirty = !0) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "textHeight", { get: function() { return this.validate(), this.Nr }, enumerable: !1, configurable: !0 }), i.prototype.destroy = function(i) { var n = this.Fr; for (var s in n) { n[s].destroy(), delete n[s] } this.Fr = null, t.prototype.destroy.call(this, i) }, i.styleDefaults = { align: "left", tint: 16777215, maxWidth: 0, letterSpacing: 0 }, i }(l.W2), O = function() { function t() {} return t.add = function() { c.kC.setExtensionXhrType("fnt", c.kC.XHR_RESPONSE_TYPE.TEXT) }, t.use = function(i, n) { var s = b(i.data); if (s) for (var e = t.getBaseUrl(this, i), r = s.parse(i.data), h = {}, o = function(t) { h[t.metadata.pageFile] = t.texture, Object.keys(h).length === r.page.length && (i.bitmapFont = E.install(r, h, !0), n()) }, u = 0; u < r.page.length; ++u) { var a = r.page[u].file, l = e + a, f = !1; for (var v in this.resources) { var d = this.resources[v]; if (d.url === l) { d.metadata.pageFile = a, d.texture ? o(d) : d.onAfterMiddleware.add(o), f = !0; break } } if (!f) { var _ = { crossOrigin: i.crossOrigin, loadType: c.kC.LOAD_TYPE.IMAGE, metadata: Object.assign({ pageFile: a }, i.metadata.imageMetadata), parentResource: i }; this.add(l, _, o) } } else n() }, t.getBaseUrl = function(i, n) { var s = n.isDataUrl ? "" : t.dirname(n.url); return n.isDataUrl && ("." === s && (s = ""), i.baseUrl && s && "/" === i.baseUrl.charAt(i.baseUrl.length - 1) && (s += "/")), (s = s.replace(i.baseUrl, "")) && "/" !== s.charAt(s.length - 1) && (s += "/"), s }, t.dirname = function(t) { var i = t.replace(/\\/g, "/").replace(/\/$/, "").replace(/\/[^\/]*$/, ""); return i === t ? "." : "" === i ? "/" : i }, t }() }, 6359: (t, i, n) => { "use strict"; n.d(i, { M_: () => s, Mr: () => m, pn: () => v, xv: () => w }); var s, e, r = n(5849), h = n(4577), o = n(3930), u = n(229), a = n(6335), l = function(t, i) { return (l = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]) })(t, i) }; (e = s || (s = {}))[e.LINEAR_VERTICAL = 0] = "LINEAR_VERTICAL", e[e.LINEAR_HORIZONTAL = 1] = "LINEAR_HORIZONTAL"; var c = { align: "left", breakWords: !1, dropShadow: !1, dropShadowAlpha: 1, dropShadowAngle: Math.PI / 6, dropShadowBlur: 0, dropShadowColor: "black", dropShadowDistance: 5, fill: "black", fillGradientType: s.LINEAR_VERTICAL, fillGradientStops: [], fontFamily: "Arial", fontSize: 26, fontStyle: "normal", fontVariant: "normal", fontWeight: "normal", letterSpacing: 0, lineHeight: 0, lineJoin: "miter", miterLimit: 10, padding: 0, stroke: "black", strokeThickness: 0, textBaseline: "alphabetic", trim: !1, whiteSpace: "pre", wordWrap: !1, wordWrapWidth: 100, leading: 0 }, f = ["serif", "sans-serif", "monospace", "cursive", "fantasy", "system-ui"], v = function() { function t(t) { this.styleID = 0, this.reset(), p(this, t, t) } return t.prototype.clone = function() { var i = {}; return p(i, this, c), new t(i) }, t.prototype.reset = function() { p(this, c, c) }, Object.defineProperty(t.prototype, "align", { get: function() { return this.Rr }, set: function(t) { this.Rr !== t && (this.Rr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "breakWords", { get: function() { return this.Dr }, set: function(t) { this.Dr !== t && (this.Dr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "dropShadow", { get: function() { return this.jr }, set: function(t) { this.jr !== t && (this.jr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "dropShadowAlpha", { get: function() { return this.Gr }, set: function(t) { this.Gr !== t && (this.Gr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "dropShadowAngle", { get: function() { return this.Wr }, set: function(t) { this.Wr !== t && (this.Wr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "dropShadowBlur", { get: function() { return this.Hr }, set: function(t) { this.Hr !== t && (this.Hr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "dropShadowColor", { get: function() { return this.Xr }, set: function(t) { var i = _(t); this.Xr !== i && (this.Xr = i, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "dropShadowDistance", { get: function() { return this.Vr }, set: function(t) { this.Vr !== t && (this.Vr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "fill", { get: function() { return this.Yr }, set: function(t) { var i = _(t); this.Yr !== i && (this.Yr = i, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "fillGradientType", { get: function() { return this.zr }, set: function(t) { this.zr !== t && (this.zr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "fillGradientStops", { get: function() { return this.Kr }, set: function(t) { (function(t, i) { if (!Array.isArray(t) || !Array.isArray(i)) return !1; if (t.length !== i.length) return !1; for (var n = 0; n < t.length; ++n) if (t[n] !== i[n]) return !1; return !0 })(this.Kr, t) || (this.Kr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "fontFamily", { get: function() { return this.qr }, set: function(t) { this.fontFamily !== t && (this.qr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "fontSize", { get: function() { return this.Lr }, set: function(t) { this.Lr !== t && (this.Lr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "fontStyle", { get: function() { return this.Zr }, set: function(t) { this.Zr !== t && (this.Zr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "fontVariant", { get: function() { return this.Jr }, set: function(t) { this.Jr !== t && (this.Jr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "fontWeight", { get: function() { return this.Qr }, set: function(t) { this.Qr !== t && (this.Qr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "letterSpacing", { get: function() { return this.kr }, set: function(t) { this.kr !== t && (this.kr = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "lineHeight", { get: function() { return this.th }, set: function(t) { this.th !== t && (this.th = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "leading", { get: function() { return this.ih }, set: function(t) { this.ih !== t && (this.ih = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "lineJoin", { get: function() { return this.nh }, set: function(t) { this.nh !== t && (this.nh = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "miterLimit", { get: function() { return this.sh }, set: function(t) { this.sh !== t && (this.sh = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "padding", { get: function() { return this.eh }, set: function(t) { this.eh !== t && (this.eh = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "stroke", { get: function() { return this.rh }, set: function(t) { var i = _(t); this.rh !== i && (this.rh = i, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "strokeThickness", { get: function() { return this.hh }, set: function(t) { this.hh !== t && (this.hh = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "textBaseline", { get: function() { return this.oh }, set: function(t) { this.oh !== t && (this.oh = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "trim", { get: function() { return this.uh }, set: function(t) { this.uh !== t && (this.uh = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "whiteSpace", { get: function() { return this.ah }, set: function(t) { this.ah !== t && (this.ah = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "wordWrap", { get: function() { return this.lh }, set: function(t) { this.lh !== t && (this.lh = t, this.styleID++) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "wordWrapWidth", { get: function() { return this.fh }, set: function(t) { this.fh !== t && (this.fh = t, this.styleID++) }, enumerable: !1, configurable: !0 }), t.prototype.toFontString = function() { var t = "number" == typeof this.fontSize ? this.fontSize + "px" : this.fontSize, i = this.fontFamily; Array.isArray(this.fontFamily) || (i = this.fontFamily.split(",")); for (var n = i.length - 1; n >= 0; n--) { var s = i[n].trim(); !/([\"\'])[^\'\"]+\1/.test(s) && f.indexOf(s) < 0 && (s = '"' + s + '"'), i[n] = s } return this.fontStyle + " " + this.fontVariant + " " + this.fontWeight + " " + t + " " + i.join(",") }, t }(); function d(t) { return "number" == typeof t ? (0, a.hex2string)(t) : ("string" == typeof t && 0 === t.indexOf("0x") && (t = t.replace("0x", "#")), t) } function _(t) { if (Array.isArray(t)) { for (var i = 0; i < t.length; ++i) t[i] = d(t[i]); return t } return d(t) } function p(t, i, n) { for (var s in n) t[s] = Array.isArray(i[s]) ? i[s].slice() : i[s] } var m = function() { function t(t, i, n, s, e, r, h, o, u) { this.text = t, this.style = i, this.width = n, this.height = s, this.lines = e, this.lineWidths = r, this.lineHeight = h, this.maxLineWidth = o, this.fontProperties = u } return t.measureText = function(i, n, s, e) { void 0 === e && (e = t.dh), s = null == s ? n.wordWrap : s; var r = n.toFontString(), h = t.measureFont(r); 0 === h.fontSize && (h.fontSize = n.fontSize, h.ascent = n.fontSize); var o = e.getContext("2d"); o.font = r; for (var u = (s ? t.wordWrap(i, n, e) : i).split(/(?:\r\n|\r|\n)/), a = new Array(u.length), l = 0, c = 0; c < u.length; c++) { var f = o.measureText(u[c]).width + (u[c].length - 1) * n.letterSpacing; a[c] = f, l = Math.max(l, f) } var v = l + n.strokeThickness; n.dropShadow && (v += n.dropShadowDistance); var d = n.lineHeight || h.fontSize + n.strokeThickness, _ = Math.max(d, h.fontSize + n.strokeThickness) + (u.length - 1) * (d + n.leading); return n.dropShadow && (_ += n.dropShadowDistance), new t(i, n, v, _, u, a, d + n.leading, l, h) }, t.wordWrap = function(i, n, s) { void 0 === s && (s = t.dh); for (var e = s.getContext("2d"), r = 0, h = "", o = "", u = Object.create(null), a = n.letterSpacing, l = n.whiteSpace, c = t.collapseSpaces(l), f = t.collapseNewlines(l), v = !c, d = n.wordWrapWidth + a, _ = t.tokenize(i), p = 0; p < _.length; p++) { var m = _[p]; if (t.isNewline(m)) { if (!f) { o += t.addLine(h), v = !c, h = "", r = 0; continue } m = " " } if (c) { var b = t.isBreakingSpace(m), w = t.isBreakingSpace(h[h.length - 1]); if (b && w) continue } var g = t.getFromCache(m, a, u, e); if (g > d) if ("" !== h && (o += t.addLine(h), h = "", r = 0), t.canBreakWords(m, n.breakWords)) for (var y = t.wordWrapSplit(m), E = 0; E < y.length; E++) { for (var S = y[E], A = 1; y[E + A];) { var T = y[E + A]; if (t.canBreakChars(S[S.length - 1], T, m, E, n.breakWords)) break; S += T, A++ } E += S.length - 1; var M = t.getFromCache(S, a, u, e); M + r > d && (o += t.addLine(h), v = !1, h = "", r = 0), h += S, r += M } else h.length > 0 && (o += t.addLine(h), h = "", r = 0), o += t.addLine(m, !(p === _.length - 1)), v = !1, h = "", r = 0; else g + r > d && (v = !1, o += t.addLine(h), h = "", r = 0), (h.length > 0 || !t.isBreakingSpace(m) || v) && (h += m, r += g) } return o += t.addLine(h, !1) }, t.addLine = function(i, n) { return void 0 === n && (n = !0), i = t.trimRight(i), i = n ? i + "\n" : i }, t.getFromCache = function(t, i, n, s) { var e = n[t]; if ("number" != typeof e) { var r = t.length * i; e = s.measureText(t).width + r, n[t] = e } return e }, t.collapseSpaces = function(t) { return "normal" === t || "pre-line" === t }, t.collapseNewlines = function(t) { return "normal" === t }, t.trimRight = function(i) { if ("string" != typeof i) return ""; for (var n = i.length - 1; n >= 0; n--) { if (!t.isBreakingSpace(i[n])) break; i = i.slice(0, -1) } return i }, t.isNewline = function(i) { return "string" == typeof i && t._h.indexOf(i.charCodeAt(0)) >= 0 }, t.isBreakingSpace = function(i, n) { return "string" == typeof i && t.ph.indexOf(i.charCodeAt(0)) >= 0 }, t.tokenize = function(i) { var n = [], s = ""; if ("string" != typeof i) return n; for (var e = 0; e < i.length; e++) { var r = i[e]; t.isBreakingSpace(r, i[e + 1]) || t.isNewline(r) ? ("" !== s && (n.push(s), s = ""), n.push(r)) : s += r } return "" !== s && n.push(s), n }, t.canBreakWords = function(t, i) { return i }, t.canBreakChars = function(t, i, n, s, e) { return !0 }, t.wordWrapSplit = function(t) { return t.split("") }, t.measureFont = function(i) { if (t.bh[i]) return t.bh[i]; var n = { ascent: 0, descent: 0, fontSize: 0 }, s = t.dh, e = t.wh; e.font = i; var r = t.METRICS_STRING + t.BASELINE_SYMBOL, h = Math.ceil(e.measureText(r).width), o = Math.ceil(e.measureText(t.BASELINE_SYMBOL).width), u = Math.ceil(t.HEIGHT_MULTIPLIER * o); o = o * t.BASELINE_MULTIPLIER | 0, s.width = h, s.height = u, e.fillStyle = "#f00", e.fillRect(0, 0, h, u), e.font = i, e.textBaseline = "alphabetic", e.fillStyle = "#000", e.fillText(r, 0, o); var a = e.getImageData(0, 0, h, u).data, l = a.length, c = 4 * h, f = 0, v = 0, d = !1; for (f = 0; f < o; ++f) { for (var _ = 0; _ < c; _ += 4) if (255 !== a[v + _]) { d = !0; break } if (d) break; v += c } for (n.ascent = o - f, v = l - c, d = !1, f = u; f > o; --f) { for (_ = 0; _ < c; _ += 4) if (255 !== a[v + _]) { d = !0; break } if (d) break; v -= c } return n.descent = f - o, n.fontSize = n.ascent + n.descent, t.bh[i] = n, n }, t.clearMetrics = function(i) { void 0 === i && (i = ""), i ? delete t.bh[i] : t.bh = {} }, Object.defineProperty(t, "dh", { get: function() { if (!t.gh) { var i = void 0; try { var n = new OffscreenCanvas(0, 0), s = n.getContext("2d"); if (s && s.measureText) return t.gh = n, n; i = document.createElement("canvas") } catch (t) { i = document.createElement("canvas") } i.width = i.height = 10, t.gh = i } return t.gh }, enumerable: !1, configurable: !0 }), Object.defineProperty(t, "wh", { get: function() { return t.yh || (t.yh = t.dh.getContext("2d")), t.yh }, enumerable: !1, configurable: !0 }), t }(); m.bh = {}, m.METRICS_STRING = "|ÉqÅ", m.BASELINE_SYMBOL = "M", m.BASELINE_MULTIPLIER = 1.4, m.HEIGHT_MULTIPLIER = 2, m._h = [10, 13], m.ph = [9, 32, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8200, 8201, 8202, 8287, 12288]; var b = { texture: !0, children: !1, baseTexture: !0 }, w = function(t) { function i(i, n, s) { var e = this, r = !1; s || (s = document.createElement("canvas"), r = !0), s.width = 3, s.height = 3; var a = h.xE.from(s); return a.orig = new u.Ae, a.trim = new u.Ae, (e = t.call(this, a) || this).Eh = r, e.canvas = s, e.context = e.canvas.getContext("2d"), e.zt = o.X.RESOLUTION, e.Sh = !0, e.Br = null, e.Ah = null, e.Mh = null, e.Oh = "", e.text = i, e.style = n, e.localStyleID = -1, e } return function(t, i) { function n() { this.constructor = t } l(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) }(i, t), i.prototype.updateText = function(t) { var n = this.Ah; if (this.localStyleID !== n.styleID && (this.dirty = !0, this.localStyleID = n.styleID), this.dirty || !t) { this.Oh = this.Ah.toFontString(); var s, e, r = this.context, h = m.measureText(this.Br || " ", this.Ah, this.Ah.wordWrap, this.canvas), o = h.height, u = h.lines, l = h.lineHeight, c = h.lineWidths, f = h.maxLineWidth, v = h.fontProperties; this.canvas.width = Math.ceil(Math.ceil(Math.max(1, h.width) + 2 * n.padding) * this.zt), this.canvas.height = Math.ceil(Math.ceil(Math.max(1, o) + 2 * n.padding) * this.zt), r.scale(this.zt, this.zt), r.clearRect(0, 0, this.canvas.width, this.canvas.height), r.font = this.Oh, r.lineWidth = n.strokeThickness, r.textBaseline = n.textBaseline, r.lineJoin = n.lineJoin, r.miterLimit = n.miterLimit; for (var d = n.dropShadow ? 2 : 1, _ = 0; _ < d; ++_) { var p = n.dropShadow && 0 === _, b = p ? Math.ceil(Math.max(1, o) + 2 * n.padding) : 0, w = b * this.zt; if (p) { r.fillStyle = "black", r.strokeStyle = "black"; var g = n.dropShadowColor, y = (0, a.hex2rgb)("number" == typeof g ? g : (0, a.string2hex)(g)), E = n.dropShadowBlur * this.zt, S = n.dropShadowDistance * this.zt; r.shadowColor = "rgba(" + 255 * y[0] + "," + 255 * y[1] + "," + 255 * y[2] + "," + n.dropShadowAlpha + ")", r.shadowBlur = E, r.shadowOffsetX = Math.cos(n.dropShadowAngle) * S, r.shadowOffsetY = Math.sin(n.dropShadowAngle) * S + w } else r.fillStyle = this.Ih(n, u, h), r.strokeStyle = n.stroke, r.shadowColor = "black", r.shadowBlur = 0, r.shadowOffsetX = 0, r.shadowOffsetY = 0; var A = (l - v.fontSize) / 2; (!i.nextLineHeightBehavior || l - v.fontSize < 0) && (A = 0); for (var T = 0; T < u.length; T++) s = n.strokeThickness / 2, e = n.strokeThickness / 2 + T * l + v.ascent + A, "right" === n.align ? s += f - c[T] : "center" === n.align && (s += (f - c[T]) / 2), n.stroke && n.strokeThickness && this.drawLetterSpacing(u[T], s + n.padding, e + n.padding - b, !0), n.fill && this.drawLetterSpacing(u[T], s + n.padding, e + n.padding - b) } this.updateTexture() } }, i.prototype.drawLetterSpacing = function(t, n, s, e) { void 0 === e && (e = !1); var r = this.Ah.letterSpacing, h = i.experimentalLetterSpacing && ("letterSpacing" in CanvasRenderingContext2D.prototype || "textLetterSpacing" in CanvasRenderingContext2D.prototype); if (0 === r || h) return h && (this.context.letterSpacing = r, this.context.textLetterSpacing = r), void(e ? this.context.strokeText(t, n, s) : this.context.fillText(t, n, s)); for (var o = n, u = Array.from ? Array.from(t) : t.split(""), a = this.context.measureText(t).width, l = 0, c = 0; c < u.length; ++c) { var f = u[c]; e ? this.context.strokeText(f, o, s) : this.context.fillText(f, o, s); for (var v = "", d = c + 1; d < u.length; ++d) v += u[d]; o += a - (l = this.context.measureText(v).width) + r, a = l } }, i.prototype.updateTexture = function() { var t = this.canvas; if (this.Ah.trim) { var i = (0, a.trimCanvas)(t); i.data && (t.width = i.width, t.height = i.height, this.context.putImageData(i.data, 0, 0)) } var n = this.Ft, s = this.Ah, e = s.trim ? 0 : s.padding, r = n.baseTexture; n.trim.width = n.It.width = t.width / this.zt, n.trim.height = n.It.height = t.height / this.zt, n.trim.x = -e, n.trim.y = -e, n.orig.width = n.It.width - 2 * e, n.orig.height = n.It.height - 2 * e, this.dr(), r.setRealSize(t.width, t.height, this.zt), n.updateUvs(), this.Xi(), this.dirty = !1 }, i.prototype.Ki = function(i) { this.Sh && this.zt !== i.resolution && (this.zt = i.resolution, this.dirty = !0), this.updateText(!0), t.prototype.Ki.call(this, i) }, i.prototype.getLocalBounds = function(i) { return this.updateText(!0), t.prototype.getLocalBounds.call(this, i) }, i.prototype.$i = function() { this.updateText(!0), this.calculateVertices(), this.ki.addQuad(this.vertexData) }, i.prototype.Ih = function(t, i, n) { var e, r = t.fill; if (!Array.isArray(r)) return r; if (1 === r.length) return r[0]; var h = t.dropShadow ? t.dropShadowDistance : 0, o = t.padding || 0, u = this.canvas.width / this.zt - h - 2 * o, a = this.canvas.height / this.zt - h - 2 * o, l = r.slice(), c = t.fillGradientStops.slice(); if (!c.length) for (var f = l.length + 1, v = 1; v < f; ++v) c.push(v / f); if (l.unshift(r[0]), c.unshift(0), l.push(r[r.length - 1]), c.push(1), t.fillGradientType === s.LINEAR_VERTICAL) { e = this.context.createLinearGradient(u / 2, o, u / 2, a + o); var d = n.fontProperties.fontSize + t.strokeThickness; for (v = 0; v < i.length; v++) { var _ = n.lineHeight * (v - 1) + d, p = n.lineHeight * v, m = p; v > 0 && _ > p && (m = (p + _) / 2); var b = p + d, w = n.lineHeight * (v + 1), g = b; v + 1 < i.length && w < b && (g = (b + w) / 2); for (var y = (g - m) / a, E = 0; E < l.length; E++) { var S = 0; S = "number" == typeof c[E] ? c[E] : E / l.length; var A = Math.min(1, Math.max(0, m / a + S * y)); A = Number(A.toFixed(5)), e.addColorStop(A, l[E]) } } } else { e = this.context.createLinearGradient(o, a / 2, u + o, a / 2); var T = l.length + 1, M = 1; for (v = 0; v < l.length; v++) { e.addColorStop("number" == typeof c[v] ? c[v] : M / T, l[v]), M++ } } return e }, i.prototype.destroy = function(i) { "boolean" == typeof i && (i = { children: i }), i = Object.assign({}, b, i), t.prototype.destroy.call(this, i), this.Eh && (this.canvas.height = this.canvas.width = 0), this.context = null, this.canvas = null, this.Ah = null }, Object.defineProperty(i.prototype, "width", { get: function() { return this.updateText(!0), Math.abs(this.scale.x) * this.Ft.orig.width }, set: function(t) { this.updateText(!0); var i = (0, a.sign)(this.scale.x) || 1; this.scale.x = i * t / this.Ft.orig.width, this.$ = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "height", { get: function() { return this.updateText(!0), Math.abs(this.scale.y) * this.Ft.orig.height }, set: function(t) { this.updateText(!0); var i = (0, a.sign)(this.scale.y) || 1; this.scale.y = i * t / this.Ft.orig.height, this.J = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "style", { get: function() { return this.Ah }, set: function(t) { this.Ah = (t = t || {}) instanceof v ? t : new v(t), this.localStyleID = -1, this.dirty = !0 }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "text", { get: function() { return this.Br }, set: function(t) { t = String(null == t ? "" : t), this.Br !== t && (this.Br = t, this.dirty = !0) }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "resolution", { get: function() { return this.zt }, set: function(t) { this.Sh = !1, this.zt !== t && (this.zt = t, this.dirty = !0) }, enumerable: !1, configurable: !0 }), i.nextLineHeightBehavior = !1, i.experimentalLetterSpacing = !1, i }(r.j) }, 8759: (t, i, n) => { "use strict"; n.d(i, { Sb: () => u, uF: () => s, vB: () => o }); var s, e, r = n(3930); /*! * @pixi/ticker - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/ticker is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ r.X.TARGET_FPMS = .06, (e = s || (s = {}))[e.INTERACTION = 50] = "INTERACTION", e[e.HIGH = 25] = "HIGH", e[e.NORMAL = 0] = "NORMAL", e[e.LOW = -25] = "LOW", e[e.UTILITY = -50] = "UTILITY"; var h = function() { function t(t, i, n, s) { void 0 === i && (i = null), void 0 === n && (n = 0), void 0 === s && (s = !1), this.next = null, this.previous = null, this.Hi = !1, this.fn = t, this.context = i, this.priority = n, this.once = s } return t.prototype.match = function(t, i) { return void 0 === i && (i = null), this.fn === t && this.context === i }, t.prototype.emit = function(t) { this.fn && (this.context ? this.fn.call(this.context, t) : this.fn(t)); var i = this.next; return this.once && this.destroy(!0), this.Hi && (this.next = null), i }, t.prototype.connect = function(t) { this.previous = t, t.next && (t.next.previous = this), this.next = t.next, t.next = this }, t.prototype.destroy = function(t) { void 0 === t && (t = !1), this.Hi = !0, this.fn = null, this.context = null, this.previous && (this.previous.next = this.next), this.next && (this.next.previous = this.previous); var i = this.next; return this.next = t ? null : i, this.previous = null, i }, t }(), o = function() { function t() { var t = this; this.autoStart = !1, this.deltaTime = 1, this.lastTime = -1, this.speed = 1, this.started = !1, this.Nh = null, this.Rh = 100, this.Ph = 0, this.ae = !1, this.xh = -1, this.gs = new h(null, null, 1 / 0), this.deltaMS = 1 / r.X.TARGET_FPMS, this.elapsedMS = 1 / r.X.TARGET_FPMS, this.Lh = function(i) { t.Nh = null, t.started && (t.update(i), t.started && null === t.Nh && t.gs.next && (t.Nh = requestAnimationFrame(t.Lh))) } } return t.prototype.Ch = function() { null === this.Nh && this.gs.next && (this.lastTime = performance.now(), this.xh = this.lastTime, this.Nh = requestAnimationFrame(this.Lh)) }, t.prototype.Uh = function() { null !== this.Nh && (cancelAnimationFrame(this.Nh), this.Nh = null) }, t.prototype.kh = function() { this.started ? this.Ch() : this.autoStart && this.start() }, t.prototype.add = function(t, i, n) { return void 0 === n && (n = s.NORMAL), this.Fh(new h(t, i, n)) }, t.prototype.addOnce = function(t, i, n) { return void 0 === n && (n = s.NORMAL), this.Fh(new h(t, i, n, !0)) }, t.prototype.Fh = function(t) { var i = this.gs.next, n = this.gs; if (i) { for (; i;) { if (t.priority > i.priority) { t.connect(n); break } n = i, i = i.next } t.previous || t.connect(n) } else t.connect(n); return this.kh(), this }, t.prototype.remove = function(t, i) { for (var n = this.gs.next; n;) n = n.match(t, i) ? n.destroy() : n.next; return this.gs.next || this.Uh(), this }, Object.defineProperty(t.prototype, "count", { get: function() { if (!this.gs) return 0; for (var t = 0, i = this.gs; i = i.next;) t++; return t }, enumerable: !1, configurable: !0 }), t.prototype.start = function() { this.started || (this.started = !0, this.Ch()) }, t.prototype.stop = function() { this.started && (this.started = !1, this.Uh()) }, t.prototype.destroy = function() { if (!this.ae) { this.stop(); for (var t = this.gs.next; t;) t = t.destroy(!0); this.gs.destroy(), this.gs = null } }, t.prototype.update = function(t) { var i; if (void 0 === t && (t = performance.now()), t > this.lastTime) { if ((i = this.elapsedMS = t - this.lastTime) > this.Rh && (i = this.Rh), i *= this.speed, this.Ph) { var n = t - this.xh | 0; if (n < this.Ph) return; this.xh = t - n % this.Ph } this.deltaMS = i, this.deltaTime = this.deltaMS * r.X.TARGET_FPMS; for (var s = this.gs, e = s.next; e;) e = e.emit(this.deltaTime); s.next || this.Uh() } else this.deltaTime = this.deltaMS = this.elapsedMS = 0; this.lastTime = t }, Object.defineProperty(t.prototype, "FPS", { get: function() { return 1e3 / this.elapsedMS }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "minFPS", { get: function() { return 1e3 / this.Rh }, set: function(t) { var i = Math.min(this.maxFPS, t), n = Math.min(Math.max(0, i) / 1e3, r.X.TARGET_FPMS); this.Rh = 1 / n }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "maxFPS", { get: function() { return this.Ph ? Math.round(1e3 / this.Ph) : 0 }, set: function(t) { if (0 === t) this.Ph = 0; else { var i = Math.max(this.minFPS, t); this.Ph = 1 / (i / 1e3) } }, enumerable: !1, configurable: !0 }), Object.defineProperty(t, "shared", { get: function() { if (!t._e) { var i = t._e = new t; i.autoStart = !0, i.ae = !0 } return t._e }, enumerable: !1, configurable: !0 }), Object.defineProperty(t, "system", { get: function() { if (!t.Bh) { var i = t.Bh = new t; i.autoStart = !0, i.ae = !0 } return t.Bh }, enumerable: !1, configurable: !0 }), t }(), u = function() { function t() {} return t.init = function(t) { var i = this; t = Object.assign({ autoStart: !0, sharedTicker: !1 }, t), Object.defineProperty(this, "ticker", { set: function(t) { this.Dh && this.Dh.remove(this.render, this), this.Dh = t, t && t.add(this.render, this, s.LOW) }, get: function() { return this.Dh } }), this.stop = function() { i.Dh.stop() }, this.start = function() { i.Dh.start() }, this.Dh = null, this.ticker = t.sharedTicker ? o.shared : new o, t.autoStart && this.start() }, t.destroy = function() { if (this.Dh) { var t = this.Dh; this.ticker = null, t.destroy() } }, t }() }, 6335: (t, i, n) => { "use strict"; n.r(i), n.d(i, { BaseTextureCache: () => W, CanvasRenderTarget: () => V, DATA_URI: () => z, EventEmitter: () => r.a, ProgramCache: () => j, TextureCache: () => G, clearTextureCache: () => X, correctBlendMode: () => S, createIndicesForQuads: () => O, decomposeDataUri: () => K, deprecation: () => D, destroyTextureCache: () => H, determineCrossOrigin: () => q, earcut: () => o.a, getBufferType: () => I, getResolutionOfUrl: () => Z, hex2rgb: () => b, hex2string: () => w, interleaveTypedArrays: () => R, isMobile: () => s.t, isPow2: () => x, isWebGLSupported: () => p, log2: () => L, nextPow2: () => P, premultiplyBlendMode: () => E, premultiplyRgba: () => A, premultiplyTint: () => T, premultiplyTintToRgba: () => M, removeItems: () => C, rgb2hex: () => y, sayHello: () => _, sign: () => U, skipHello: () => d, string2hex: () => g, trimCanvas: () => $, uid: () => F, url: () => l }); var s = n(3930), e = n(2049), r = n.n(e), h = n(223), o = n.n(h), u = n(9830), a = n(4936), l = { parse: u.Qc, format: u.WU, resolve: u.DB }; s.X.RETINA_PREFIX = /@([0-9\.]+)x/, s.X.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = !1; var c, f = !1, v = "6.3.2"; function d() { f = !0 } function _(t) { var i; if (!f) { if (navigator.userAgent.toLowerCase().indexOf("chrome") > -1)(i = globalThis.console).log.apply(i, ["\n %c %c %c PixiJS " + v + " - ✰ " + t + " ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n", "background: #ff66a5; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "color: #ff66a5; background: #030307; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "background: #ffc3dc; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;"]); else globalThis.console && globalThis.console.log("PixiJS " + v + " - " + t + " - http://www.pixijs.com/"); f = !0 } } function p() { return void 0 === c && (c = function() { var t = { stencil: !0, failIfMajorPerformanceCaveat: s.X.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT }; try { if (!globalThis.WebGLRenderingContext) return !1; var i = document.createElement("canvas"), n = i.getContext("webgl", t) || i.getContext("experimental-webgl", t), e = !(!n || !n.getContextAttributes().stencil); if (n) { var r = n.getExtension("WEBGL_lose_context"); r && r.loseContext() } return n = null, e } catch (t) { return !1 } }()), c } var m = { aliceblue: "#f0f8ff", antiquewhite: "#faebd7", aqua: "#00ffff", aquamarine: "#7fffd4", azure: "#f0ffff", beige: "#f5f5dc", bisque: "#ffe4c4", black: "#000000", blanchedalmond: "#ffebcd", blue: "#0000ff", blueviolet: "#8a2be2", brown: "#a52a2a", burlywood: "#deb887", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", cornflowerblue: "#6495ed", cornsilk: "#fff8dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", darkkhaki: "#bdb76b", darkmagenta: "#8b008b", darkolivegreen: "#556b2f", darkorange: "#ff8c00", darkorchid: "#9932cc", darkred: "#8b0000", darksalmon: "#e9967a", darkseagreen: "#8fbc8f", darkslateblue: "#483d8b", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", darkturquoise: "#00ced1", darkviolet: "#9400d3", deeppink: "#ff1493", deepskyblue: "#00bfff", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1e90ff", firebrick: "#b22222", floralwhite: "#fffaf0", forestgreen: "#228b22", fuchsia: "#ff00ff", gainsboro: "#dcdcdc", ghostwhite: "#f8f8ff", goldenrod: "#daa520", gold: "#ffd700", gray: "#808080", green: "#008000", greenyellow: "#adff2f", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", indianred: "#cd5c5c", indigo: "#4b0082", ivory: "#fffff0", khaki: "#f0e68c", lavenderblush: "#fff0f5", lavender: "#e6e6fa", lawngreen: "#7cfc00", lemonchiffon: "#fffacd", lightblue: "#add8e6", lightcoral: "#f08080", lightcyan: "#e0ffff", lightgoldenrodyellow: "#fafad2", lightgray: "#d3d3d3", lightgreen: "#90ee90", lightgrey: "#d3d3d3", lightpink: "#ffb6c1", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", lightskyblue: "#87cefa", lightslategray: "#778899", lightslategrey: "#778899", lightsteelblue: "#b0c4de", lightyellow: "#ffffe0", lime: "#00ff00", limegreen: "#32cd32", linen: "#faf0e6", magenta: "#ff00ff", maroon: "#800000", mediumaquamarine: "#66cdaa", mediumblue: "#0000cd", mediumorchid: "#ba55d3", mediumpurple: "#9370db", mediumseagreen: "#3cb371", mediumslateblue: "#7b68ee", mediumspringgreen: "#00fa9a", mediumturquoise: "#48d1cc", mediumvioletred: "#c71585", midnightblue: "#191970", mintcream: "#f5fffa", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", navajowhite: "#ffdead", navy: "#000080", oldlace: "#fdf5e6", olive: "#808000", olivedrab: "#6b8e23", orange: "#ffa500", orangered: "#ff4500", orchid: "#da70d6", palegoldenrod: "#eee8aa", palegreen: "#98fb98", paleturquoise: "#afeeee", palevioletred: "#db7093", papayawhip: "#ffefd5", peachpuff: "#ffdab9", peru: "#cd853f", pink: "#ffc0cb", plum: "#dda0dd", powderblue: "#b0e0e6", purple: "#800080", rebeccapurple: "#663399", red: "#ff0000", rosybrown: "#bc8f8f", royalblue: "#4169e1", saddlebrown: "#8b4513", salmon: "#fa8072", sandybrown: "#f4a460", seagreen: "#2e8b57", seashell: "#fff5ee", sienna: "#a0522d", silver: "#c0c0c0", skyblue: "#87ceeb", slateblue: "#6a5acd", slategray: "#708090", slategrey: "#708090", snow: "#fffafa", springgreen: "#00ff7f", steelblue: "#4682b4", tan: "#d2b48c", teal: "#008080", thistle: "#d8bfd8", tomato: "#ff6347", turquoise: "#40e0d0", violet: "#ee82ee", wheat: "#f5deb3", white: "#ffffff", whitesmoke: "#f5f5f5", yellow: "#ffff00", yellowgreen: "#9acd32" }; function b(t, i) { return void 0 === i && (i = []), i[0] = (t >> 16 & 255) / 255, i[1] = (t >> 8 & 255) / 255, i[2] = (255 & t) / 255, i } function w(t) { var i = t.toString(16); return "#" + (i = "000000".substring(0, 6 - i.length) + i) } function g(t) { return "string" == typeof t && "#" === (t = m[t.toLowerCase()] || t)[0] && (t = t.slice(1)), parseInt(t, 16) } function y(t) { return (255 * t[0] << 16) + (255 * t[1] << 8) + (255 * t[2] | 0) } var E = function() { for (var t = [], i = [], n = 0; n < 32; n++) t[n] = n, i[n] = n; t[a.T$.NORMAL_NPM] = a.T$.NORMAL, t[a.T$.ADD_NPM] = a.T$.ADD, t[a.T$.SCREEN_NPM] = a.T$.SCREEN, i[a.T$.NORMAL] = a.T$.NORMAL_NPM, i[a.T$.ADD] = a.T$.ADD_NPM, i[a.T$.SCREEN] = a.T$.SCREEN_NPM; var s = []; return s.push(i), s.push(t), s }(); function S(t, i) { return E[i ? 1 : 0][t] } function A(t, i, n, s) { return n = n || new Float32Array(4), s || void 0 === s ? (n[0] = t[0] * i, n[1] = t[1] * i, n[2] = t[2] * i) : (n[0] = t[0], n[1] = t[1], n[2] = t[2]), n[3] = i, n } function T(t, i) { if (1 === i) return (255 * i << 24) + t; if (0 === i) return 0; var n = t >> 16 & 255, s = t >> 8 & 255, e = 255 & t; return (255 * i << 24) + ((n = n * i + .5 | 0) << 16) + ((s = s * i + .5 | 0) << 8) + (e = e * i + .5 | 0) } function M(t, i, n, s) { return (n = n || new Float32Array(4))[0] = (t >> 16 & 255) / 255, n[1] = (t >> 8 & 255) / 255, n[2] = (255 & t) / 255, (s || void 0 === s) && (n[0] *= i, n[1] *= i, n[2] *= i), n[3] = i, n } function O(t, i) { void 0 === i && (i = null); var n = 6 * t; if ((i = i || new Uint16Array(n)).length !== n) throw new Error("Out buffer length is incorrect, got " + i.length + " and expected " + n); for (var s = 0, e = 0; s < n; s += 6, e += 4) i[s + 0] = e + 0, i[s + 1] = e + 1, i[s + 2] = e + 2, i[s + 3] = e + 0, i[s + 4] = e + 2, i[s + 5] = e + 3; return i } function I(t) { if (4 === t.BYTES_PER_ELEMENT) return t instanceof Float32Array ? "Float32Array" : t instanceof Uint32Array ? "Uint32Array" : "Int32Array"; if (2 === t.BYTES_PER_ELEMENT) { if (t instanceof Uint16Array) return "Uint16Array" } else if (1 === t.BYTES_PER_ELEMENT && t instanceof Uint8Array) return "Uint8Array"; return null } var N = { Float32Array, Uint32Array, Int32Array, Uint8Array }; function R(t, i) { for (var n = 0, s = 0, e = {}, r = 0; r < t.length; r++) s += i[r], n += t[r].length; var h = new ArrayBuffer(4 * n), o = null, u = 0; for (r = 0; r < t.length; r++) { var a = i[r], l = t[r], c = I(l); e[c] || (e[c] = new N[c](h)), o = e[c]; for (var f = 0; f < l.length; f++) { o[(f / a | 0) * s + u + f % a] = l[f] } u += a } return new Float32Array(h) } function P(t) { return t += 0 === t ? 1 : 0, --t, t |= t >>> 1, t |= t >>> 2, t |= t >>> 4, t |= t >>> 8, (t |= t >>> 16) + 1 } function x(t) { return !(t & t - 1 || !t) } function L(t) { var i = (t > 65535 ? 1 : 0) << 4, n = ((t >>>= i) > 255 ? 1 : 0) << 3; return i |= n, i |= n = ((t >>>= n) > 15 ? 1 : 0) << 2, (i |= n = ((t >>>= n) > 3 ? 1 : 0) << 1) | (t >>>= n) >> 1 } function C(t, i, n) { var s, e = t.length; if (!(i >= e || 0 === n)) { var r = e - (n = i + n > e ? e - i : n); for (s = i; s < r; ++s) t[s] = t[s + n]; t.length = r } } function U(t) { return 0 === t ? 0 : t < 0 ? -1 : 1 } var k = 0; function F() { return ++k } var B = {}; function D(t, i, n) { if (void 0 === n && (n = 3), !B[i]) { var s = (new Error).stack; void 0 === s || (s = s.split("\n").splice(n).join("\n"), console.groupCollapsed && (console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", i + "\nDeprecated since v" + t), console.groupEnd())), B[i] = !0 } } var j = {}, G = Object.create(null), W = Object.create(null); function H() { var t; for (t in G) G[t].destroy(); for (t in W) W[t].destroy() } function X() { var t; for (t in G) delete G[t]; for (t in W) delete W[t] } var V = function() { function t(t, i, n) { this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d"), this.resolution = n || s.X.RESOLUTION, this.resize(t, i) } return t.prototype.clear = function() { this.context.setTransform(1, 0, 0, 1, 0, 0), this.context.clearRect(0, 0, this.canvas.width, this.canvas.height) }, t.prototype.resize = function(t, i) { this.canvas.width = Math.round(t * this.resolution), this.canvas.height = Math.round(i * this.resolution) }, t.prototype.destroy = function() { this.context = null, this.canvas = null }, Object.defineProperty(t.prototype, "width", { get: function() { return this.canvas.width }, set: function(t) { this.canvas.width = Math.round(t) }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "height", { get: function() { return this.canvas.height }, set: function(t) { this.canvas.height = Math.round(t) }, enumerable: !1, configurable: !0 }), t }(); function $(t) { var i, n, s, e = t.width, r = t.height, h = t.getContext("2d"), o = h.getImageData(0, 0, e, r).data, u = o.length, a = { top: null, left: null, right: null, bottom: null }, l = null; for (i = 0; i < u; i += 4) 0 !== o[i + 3] && (n = i / 4 % e, s = ~~(i / 4 / e), null === a.top && (a.top = s), (null === a.left || n < a.left) && (a.left = n), (null === a.right || a.right < n) && (a.right = n + 1), (null === a.bottom || a.bottom < s) && (a.bottom = s)); return null !== a.top && (l = h.getImageData(a.left, a.top, e = a.right - a.left, r = a.bottom - a.top + 1)), { height: r, width: e, data: l } } var Y, z = /^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i; function K(t) { var i = z.exec(t); if (i) return { mediaType: i[1] ? i[1].toLowerCase() : void 0, subType: i[2] ? i[2].toLowerCase() : void 0, charset: i[3] ? i[3].toLowerCase() : void 0, encoding: i[4] ? i[4].toLowerCase() : void 0, data: i[5] } } function q(t, i) { if (void 0 === i && (i = globalThis.location), 0 === t.indexOf("data:")) return ""; i = i || globalThis.location, Y || (Y = document.createElement("a")), Y.href = t; var n = l.parse(Y.href); return n.hostname === i.hostname && (!n.port && "" === i.port || n.port === i.port) && n.protocol === i.protocol ? "" : "anonymous" } function Z(t, i) { var n = s.X.RETINA_PREFIX.exec(t); return n ? parseFloat(n[1]) : void 0 !== i ? i : 1 } }, 9588: (t, i, n) => { "use strict"; var s = n(3362), e = n(8358), r = e(s("String.prototype.indexOf")); t.exports = function(t, i) { var n = s(t, !!i); return "function" == typeof n && r(t, ".prototype.") > -1 ? e(n) : n } }, 8358: (t, i, n) => { "use strict"; var s = n(7535), e = n(3362), r = e("%Function.prototype.apply%"), h = e("%Function.prototype.call%"), o = e("%Reflect.apply%", !0) || s.call(h, r), u = e("%Object.getOwnPropertyDescriptor%", !0), a = e("%Object.defineProperty%", !0), l = e("%Math.max%"); if (a) try { a({}, "a", { value: 1 }) } catch (t) { a = null } t.exports = function(t) { var i = o(s, h, arguments); u && a && (u(i, "length").configurable && a(i, "length", { value: 1 + l(0, t.length - (arguments.length - 1)) })); return i }; var c = function() { return o(s, r, arguments) }; a ? a(t.exports, "apply", { value: c }) : t.exports.apply = c }, 223: t => { "use strict"; function i(t, i, s) { s = s || 2; var r, h, o, u, c, f, d, _ = i && i.length, p = _ ? i[0] * s : t.length, m = n(t, 0, p, s, !0), b = []; if (!m || m.next === m.prev) return b; if (_ && (m = function(t, i, s, e) { var r, h, o, u = []; for (r = 0, h = i.length; r < h; r++)(o = n(t, i[r] * e, r < h - 1 ? i[r + 1] * e : t.length, e, !1)) === o.next && (o.steiner = !0), u.push(v(o)); for (u.sort(a), r = 0; r < u.length; r++) s = l(u[r], s); return s }(t, i, m, s)), t.length > 80 * s) { r = o = t[0], h = u = t[1]; for (var w = s; w < p; w += s)(c = t[w]) < r && (r = c), (f = t[w + 1]) < h && (h = f), c > o && (o = c), f > u && (u = f); d = 0 !== (d = Math.max(o - r, u - h)) ? 32767 / d : 0 } return e(m, b, s, r, h, d, 0), b } function n(t, i, n, s, e) { var r, h; if (e === M(t, i, n, s) > 0) for (r = i; r < n; r += s) h = S(r, t[r], t[r + 1], h); else for (r = n - s; r >= i; r -= s) h = S(r, t[r], t[r + 1], h); return h && m(h, h.next) && (A(h), h = h.next), h } function s(t, i) { if (!t) return t; i || (i = t); var n, s = t; do { if (n = !1, s.steiner || !m(s, s.next) && 0 !== p(s.prev, s, s.next)) s = s.next; else { if (A(s), (s = i = s.prev) === s.next) break; n = !0 } } while (n || s !== i); return i } function e(t, i, n, a, l, c, v) { if (t) { !v && c && function(t, i, n, s) { var e = t; do { 0 === e.z && (e.z = f(e.x, e.y, i, n, s)), e.prevZ = e.prev, e.nextZ = e.next, e = e.next } while (e !== t); e.prevZ.nextZ = null, e.prevZ = null, function(t) { var i, n, s, e, r, h, o, u, a = 1; do { for (n = t, t = null, r = null, h = 0; n;) { for (h++, s = n, o = 0, i = 0; i < a && (o++, s = s.nextZ); i++); for (u = a; o > 0 || u > 0 && s;) 0 !== o && (0 === u || !s || n.z <= s.z) ? (e = n, n = n.nextZ, o--) : (e = s, s = s.nextZ, u--), r ? r.nextZ = e : t = e, e.prevZ = r, r = e; n = s } r.nextZ = null, a *= 2 } while (h > 1) }(e) }(t, a, l, c); for (var d, _, p = t; t.prev !== t.next;) if (d = t.prev, _ = t.next, c ? h(t, a, l, c) : r(t)) i.push(d.i / n | 0), i.push(t.i / n | 0), i.push(_.i / n | 0), A(t), t = _.next, p = _.next; else if ((t = _) === p) { v ? 1 === v ? e(t = o(s(t), i, n), i, n, a, l, c, 2) : 2 === v && u(t, i, n, a, l, c) : e(s(t), i, n, a, l, c, 1); break } } } function r(t) { var i = t.prev, n = t, s = t.next; if (p(i, n, s) >= 0) return !1; for (var e = i.x, r = n.x, h = s.x, o = i.y, u = n.y, a = s.y, l = e < r ? e < h ? e : h : r < h ? r : h, c = o < u ? o < a ? o : a : u < a ? u : a, f = e > r ? e > h ? e : h : r > h ? r : h, v = o > u ? o > a ? o : a : u > a ? u : a, _ = s.next; _ !== i;) { if (_.x >= l && _.x <= f && _.y >= c && _.y <= v && d(e, o, r, u, h, a, _.x, _.y) && p(_.prev, _, _.next) >= 0) return !1; _ = _.next } return !0 } function h(t, i, n, s) { var e = t.prev, r = t, h = t.next; if (p(e, r, h) >= 0) return !1; for (var o = e.x, u = r.x, a = h.x, l = e.y, c = r.y, v = h.y, _ = o < u ? o < a ? o : a : u < a ? u : a, m = l < c ? l < v ? l : v : c < v ? c : v, b = o > u ? o > a ? o : a : u > a ? u : a, w = l > c ? l > v ? l : v : c > v ? c : v, g = f(_, m, i, n, s), y = f(b, w, i, n, s), E = t.prevZ, S = t.nextZ; E && E.z >= g && S && S.z <= y;) { if (E.x >= _ && E.x <= b && E.y >= m && E.y <= w && E !== e && E !== h && d(o, l, u, c, a, v, E.x, E.y) && p(E.prev, E, E.next) >= 0) return !1; if (E = E.prevZ, S.x >= _ && S.x <= b && S.y >= m && S.y <= w && S !== e && S !== h && d(o, l, u, c, a, v, S.x, S.y) && p(S.prev, S, S.next) >= 0) return !1; S = S.nextZ } for (; E && E.z >= g;) { if (E.x >= _ && E.x <= b && E.y >= m && E.y <= w && E !== e && E !== h && d(o, l, u, c, a, v, E.x, E.y) && p(E.prev, E, E.next) >= 0) return !1; E = E.prevZ } for (; S && S.z <= y;) { if (S.x >= _ && S.x <= b && S.y >= m && S.y <= w && S !== e && S !== h && d(o, l, u, c, a, v, S.x, S.y) && p(S.prev, S, S.next) >= 0) return !1; S = S.nextZ } return !0 } function o(t, i, n) { var e = t; do { var r = e.prev, h = e.next.next; !m(r, h) && b(r, e, e.next, h) && y(r, h) && y(h, r) && (i.push(r.i / n | 0), i.push(e.i / n | 0), i.push(h.i / n | 0), A(e), A(e.next), e = t = h), e = e.next } while (e !== t); return s(e) } function u(t, i, n, r, h, o) { var u = t; do { for (var a = u.next.next; a !== u.prev;) { if (u.i !== a.i && _(u, a)) { var l = E(u, a); return u = s(u, u.next), l = s(l, l.next), e(u, i, n, r, h, o, 0), void e(l, i, n, r, h, o, 0) } a = a.next } u = u.next } while (u !== t) } function a(t, i) { return t.x - i.x } function l(t, i) { var n = function(t, i) { var n, s = i, e = t.x, r = t.y, h = -1 / 0; do { if (r <= s.y && r >= s.next.y && s.next.y !== s.y) { var o = s.x + (r - s.y) * (s.next.x - s.x) / (s.next.y - s.y); if (o <= e && o > h && (h = o, n = s.x < s.next.x ? s : s.next, o === e)) return n } s = s.next } while (s !== i); if (!n) return null; var u, a = n, l = n.x, f = n.y, v = 1 / 0; s = n; do { e >= s.x && s.x >= l && e !== s.x && d(r < f ? e : h, r, l, f, r < f ? h : e, r, s.x, s.y) && (u = Math.abs(r - s.y) / (e - s.x), y(s, t) && (u < v || u === v && (s.x > n.x || s.x === n.x && c(n, s))) && (n = s, v = u)), s = s.next } while (s !== a); return n }(t, i); if (!n) return i; var e = E(n, t); return s(e, e.next), s(n, n.next) } function c(t, i) { return p(t.prev, t, i.prev) < 0 && p(i.next, t, t.next) < 0 } function f(t, i, n, s, e) { return (t = 1431655765 & ((t = 858993459 & ((t = 252645135 & ((t = 16711935 & ((t = (t - n) * e | 0) | t << 8)) | t << 4)) | t << 2)) | t << 1)) | (i = 1431655765 & ((i = 858993459 & ((i = 252645135 & ((i = 16711935 & ((i = (i - s) * e | 0) | i << 8)) | i << 4)) | i << 2)) | i << 1)) << 1 } function v(t) { var i = t, n = t; do { (i.x < n.x || i.x === n.x && i.y < n.y) && (n = i), i = i.next } while (i !== t); return n } function d(t, i, n, s, e, r, h, o) { return (e - h) * (i - o) >= (t - h) * (r - o) && (t - h) * (s - o) >= (n - h) * (i - o) && (n - h) * (r - o) >= (e - h) * (s - o) } function _(t, i) { return t.next.i !== i.i && t.prev.i !== i.i && ! function(t, i) { var n = t; do { if (n.i !== t.i && n.next.i !== t.i && n.i !== i.i && n.next.i !== i.i && b(n, n.next, t, i)) return !0; n = n.next } while (n !== t); return !1 }(t, i) && (y(t, i) && y(i, t) && function(t, i) { var n = t, s = !1, e = (t.x + i.x) / 2, r = (t.y + i.y) / 2; do { n.y > r != n.next.y > r && n.next.y !== n.y && e < (n.next.x - n.x) * (r - n.y) / (n.next.y - n.y) + n.x && (s = !s), n = n.next } while (n !== t); return s }(t, i) && (p(t.prev, t, i.prev) || p(t, i.prev, i)) || m(t, i) && p(t.prev, t, t.next) > 0 && p(i.prev, i, i.next) > 0) } function p(t, i, n) { return (i.y - t.y) * (n.x - i.x) - (i.x - t.x) * (n.y - i.y) } function m(t, i) { return t.x === i.x && t.y === i.y } function b(t, i, n, s) { var e = g(p(t, i, n)), r = g(p(t, i, s)), h = g(p(n, s, t)), o = g(p(n, s, i)); return e !== r && h !== o || (!(0 !== e || !w(t, n, i)) || (!(0 !== r || !w(t, s, i)) || (!(0 !== h || !w(n, t, s)) || !(0 !== o || !w(n, i, s))))) } function w(t, i, n) { return i.x <= Math.max(t.x, n.x) && i.x >= Math.min(t.x, n.x) && i.y <= Math.max(t.y, n.y) && i.y >= Math.min(t.y, n.y) } function g(t) { return t > 0 ? 1 : t < 0 ? -1 : 0 } function y(t, i) { return p(t.prev, t, t.next) < 0 ? p(t, i, t.next) >= 0 && p(t, t.prev, i) >= 0 : p(t, i, t.prev) < 0 || p(t, t.next, i) < 0 } function E(t, i) { var n = new T(t.i, t.x, t.y), s = new T(i.i, i.x, i.y), e = t.next, r = i.prev; return t.next = i, i.prev = t, n.next = e, e.prev = n, s.next = n, n.prev = s, r.next = s, s.prev = r, s } function S(t, i, n, s) { var e = new T(t, i, n); return s ? (e.next = s.next, e.prev = s, s.next.prev = e, s.next = e) : (e.prev = e, e.next = e), e } function A(t) { t.next.prev = t.prev, t.prev.next = t.next, t.prevZ && (t.prevZ.nextZ = t.nextZ), t.nextZ && (t.nextZ.prevZ = t.prevZ) } function T(t, i, n) { this.i = t, this.x = i, this.y = n, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1 } function M(t, i, n, s) { for (var e = 0, r = i, h = n - s; r < n; r += s) e += (t[h] - t[r]) * (t[r + 1] + t[h + 1]), h = r; return e } t.exports = i, t.exports.default = i, i.deviation = function(t, i, n, s) { var e = i && i.length, r = Math.abs(M(t, 0, e ? i[0] * n : t.length, n)); if (e) for (var h = 0, o = i.length; h < o; h++) { r -= Math.abs(M(t, i[h] * n, h < o - 1 ? i[h + 1] * n : t.length, n)) } var u = 0; for (h = 0; h < s.length; h += 3) { var a = s[h] * n, l = s[h + 1] * n, c = s[h + 2] * n; u += Math.abs((t[a] - t[c]) * (t[l + 1] - t[a + 1]) - (t[a] - t[l]) * (t[c + 1] - t[a + 1])) } return 0 === r && 0 === u ? 0 : Math.abs((u - r) / r) }, i.flatten = function(t) { for (var i = t[0][0].length, n = { vertices: [], holes: [], dimensions: i }, s = 0, e = 0; e < t.length; e++) { for (var r = 0; r < t[e].length; r++) for (var h = 0; h < i; h++) n.vertices.push(t[e][r][h]); e > 0 && n.holes.push(s += t[e - 1].length) } return n } }, 2049: t => { "use strict"; var i = Object.prototype.hasOwnProperty, n = "~"; function s() {} function e(t, i, n) { this.fn = t, this.context = i, this.once = n || !1 } function r(t, i, s, r, h) { if ("function" != typeof s) throw new TypeError("The listener must be a function"); var o = new e(s, r || t, h), u = n ? n + i : i; return t.jh[u] ? t.jh[u].fn ? t.jh[u] = [t.jh[u], o] : t.jh[u].push(o) : (t.jh[u] = o, t.Gh++), t } function h(t, i) { 0 == --t.Gh ? t.jh = new s : delete t.jh[i] } function o() { this.jh = new s, this.Gh = 0 } Object.create && (s.prototype = Object.create(null), (new s).__proto__ || (n = !1)), o.prototype.eventNames = function() { var t, s, e = []; if (0 === this.Gh) return e; for (s in t = this.jh) i.call(t, s) && e.push(n ? s.slice(1) : s); return Object.getOwnPropertySymbols ? e.concat(Object.getOwnPropertySymbols(t)) : e }, o.prototype.listeners = function(t) { var i = this.jh[n ? n + t : t]; if (!i) return []; if (i.fn) return [i.fn]; for (var s = 0, e = i.length, r = new Array(e); s < e; s++) r[s] = i[s].fn; return r }, o.prototype.listenerCount = function(t) { var i = this.jh[n ? n + t : t]; return i ? i.fn ? 1 : i.length : 0 }, o.prototype.emit = function(t, i, s, e, r, h) { var o = n ? n + t : t; if (!this.jh[o]) return !1; var u, a, l = this.jh[o], c = arguments.length; if (l.fn) { switch (l.once && this.removeListener(t, l.fn, void 0, !0), c) { case 1: return l.fn.call(l.context), !0; case 2: return l.fn.call(l.context, i), !0; case 3: return l.fn.call(l.context, i, s), !0; case 4: return l.fn.call(l.context, i, s, e), !0; case 5: return l.fn.call(l.context, i, s, e, r), !0; case 6: return l.fn.call(l.context, i, s, e, r, h), !0 } for (a = 1, u = new Array(c - 1); a < c; a++) u[a - 1] = arguments[a]; l.fn.apply(l.context, u) } else { var f, v = l.length; for (a = 0; a < v; a++) switch (l[a].once && this.removeListener(t, l[a].fn, void 0, !0), c) { case 1: l[a].fn.call(l[a].context); break; case 2: l[a].fn.call(l[a].context, i); break; case 3: l[a].fn.call(l[a].context, i, s); break; case 4: l[a].fn.call(l[a].context, i, s, e); break; default: if (!u) for (f = 1, u = new Array(c - 1); f < c; f++) u[f - 1] = arguments[f]; l[a].fn.apply(l[a].context, u) } } return !0 }, o.prototype.on = function(t, i, n) { return r(this, t, i, n, !1) }, o.prototype.once = function(t, i, n) { return r(this, t, i, n, !0) }, o.prototype.removeListener = function(t, i, s, e) { var r = n ? n + t : t; if (!this.jh[r]) return this; if (!i) return h(this, r), this; var o = this.jh[r]; if (o.fn) o.fn !== i || e && !o.once || s && o.context !== s || h(this, r); else { for (var u = 0, a = [], l = o.length; u < l; u++)(o[u].fn !== i || e && !o[u].once || s && o[u].context !== s) && a.push(o[u]); a.length ? this.jh[r] = 1 === a.length ? a[0] : a : h(this, r) } return this }, o.prototype.removeAllListeners = function(t) { var i; return t ? this.jh[i = n ? n + t : t] && h(this, i) : (this.jh = new s, this.Gh = 0), this }, o.prototype.off = o.prototype.removeListener, o.prototype.addListener = o.prototype.on, o.prefixed = n, o.EventEmitter = o, t.exports = o }, 9181: t => { "use strict"; var i, n = "object" == typeof Reflect ? Reflect : null, s = n && "function" == typeof n.apply ? n.apply : function(t, i, n) { return Function.prototype.apply.call(t, i, n) }; i = n && "function" == typeof n.ownKeys ? n.ownKeys : Object.getOwnPropertySymbols ? function(t) { return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)) } : function(t) { return Object.getOwnPropertyNames(t) }; var e = Number.isNaN || function(t) { return t != t }; function r() { r.init.call(this) } t.exports = r, t.exports.once = function(t, i) { return new Promise((function(n, s) { function e(n) { t.removeListener(i, r), s(n) } function r() { "function" == typeof t.removeListener && t.removeListener("error", e), n([].slice.call(arguments)) } _(t, i, r, { once: !0 }), "error" !== i && function(t, i, n) { "function" == typeof t.on && _(t, "error", i, n) }(t, e, { once: !0 }) })) }, r.EventEmitter = r, r.prototype.jh = void 0, r.prototype.Gh = 0, r.prototype.Wh = void 0; var h = 10; function o(t) { if ("function" != typeof t) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t) } function u(t) { return void 0 === t.Wh ? r.defaultMaxListeners : t.Wh } function a(t, i, n, s) { var e, r, h; if (o(n), void 0 === (r = t.jh) ? (r = t.jh = Object.create(null), t.Gh = 0) : (void 0 !== r.newListener && (t.emit("newListener", i, n.listener ? n.listener : n), r = t.jh), h = r[i]), void 0 === h) h = r[i] = n, ++t.Gh; else if ("function" == typeof h ? h = r[i] = s ? [n, h] : [h, n] : s ? h.unshift(n) : h.push(n), (e = u(t)) > 0 && h.length > e && !h.warned) { h.warned = !0; var a = new Error("Possible EventEmitter memory leak detected. " + h.length + " " + String(i) + " listeners added. Use emitter.setMaxListeners() to increase limit"); a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = i, a.count = h.length, console && console } return t } function l() { if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments) } function c(t, i, n) { var s = { fired: !1, wrapFn: void 0, target: t, type: i, listener: n }, e = l.bind(s); return e.listener = n, s.wrapFn = e, e } function f(t, i, n) { var s = t.jh; if (void 0 === s) return []; var e = s[i]; return void 0 === e ? [] : "function" == typeof e ? n ? [e.listener || e] : [e] : n ? function(t) { for (var i = new Array(t.length), n = 0; n < i.length; ++n) i[n] = t[n].listener || t[n]; return i }(e) : d(e, e.length) } function v(t) { var i = this.jh; if (void 0 !== i) { var n = i[t]; if ("function" == typeof n) return 1; if (void 0 !== n) return n.length } return 0 } function d(t, i) { for (var n = new Array(i), s = 0; s < i; ++s) n[s] = t[s]; return n } function _(t, i, n, s) { if ("function" == typeof t.on) s.once ? t.once(i, n) : t.on(i, n); else { if ("function" != typeof t.addEventListener) throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t); t.addEventListener(i, (function e(r) { s.once && t.removeEventListener(i, e), n(r) })) } } Object.defineProperty(r, "defaultMaxListeners", { enumerable: !0, get: function() { return h }, set: function(t) { if ("number" != typeof t || t < 0 || e(t)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + "."); h = t } }), r.init = function() { void 0 !== this.jh && this.jh !== Object.getPrototypeOf(this).jh || (this.jh = Object.create(null), this.Gh = 0), this.Wh = this.Wh || void 0 }, r.prototype.setMaxListeners = function(t) { if ("number" != typeof t || t < 0 || e(t)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + "."); return this.Wh = t, this }, r.prototype.getMaxListeners = function() { return u(this) }, r.prototype.emit = function(t) { for (var i = [], n = 1; n < arguments.length; n++) i.push(arguments[n]); var e = "error" === t, r = this.jh; if (void 0 !== r) e = e && void 0 === r.error; else if (!e) return !1; if (e) { var h; if (i.length > 0 && (h = i[0]), h instanceof Error) throw h; var o = new Error("Unhandled error." + (h ? " (" + h.message + ")" : "")); throw o.context = h, o } var u = r[t]; if (void 0 === u) return !1; if ("function" == typeof u) s(u, this, i); else { var a = u.length, l = d(u, a); for (n = 0; n < a; ++n) s(l[n], this, i) } return !0 }, r.prototype.on = r.prototype.addListener = function(t, i) { return a(this, t, i, !1) }, r.prototype.prependListener = function(t, i) { return a(this, t, i, !0) }, r.prototype.once = function(t, i) { return o(i), this.on(t, c(this, t, i)), this }, r.prototype.prependOnceListener = function(t, i) { return o(i), this.prependListener(t, c(this, t, i)), this }, r.prototype.off = r.prototype.removeListener = function(t, i) { var n, s, e, r, h; if (o(i), void 0 === (s = this.jh)) return this; if (void 0 === (n = s[t])) return this; if (n === i || n.listener === i) 0 == --this.Gh ? this.jh = Object.create(null) : (delete s[t], s.removeListener && this.emit("removeListener", t, n.listener || i)); else if ("function" != typeof n) { for (e = -1, r = n.length - 1; r >= 0; r--) if (n[r] === i || n[r].listener === i) { h = n[r].listener, e = r; break } if (e < 0) return this; 0 === e ? n.shift() : function(t, i) { for (; i + 1 < t.length; i++) t[i] = t[i + 1]; t.pop() }(n, e), 1 === n.length && (s[t] = n[0]), void 0 !== s.removeListener && this.emit("removeListener", t, h || i) } return this }, r.prototype.removeAllListeners = function(t) { var i, n, s; if (void 0 === (n = this.jh)) return this; if (void 0 === n.removeListener) return 0 === arguments.length ? (this.jh = Object.create(null), this.Gh = 0) : void 0 !== n[t] && (0 == --this.Gh ? this.jh = Object.create(null) : delete n[t]), this; if (0 === arguments.length) { var e, r = Object.keys(n); for (s = 0; s < r.length; ++s) "removeListener" !== (e = r[s]) && this.removeAllListeners(e); return this.removeAllListeners("removeListener"), this.jh = Object.create(null), this.Gh = 0, this } if ("function" == typeof(i = n[t])) this.removeListener(t, i); else if (void 0 !== i) for (s = i.length - 1; s >= 0; s--) this.removeListener(t, i[s]); return this }, r.prototype.listeners = function(t) { return f(this, t, !0) }, r.prototype.rawListeners = function(t) { return f(this, t, !1) }, r.listenerCount = function(t, i) { return "function" == typeof t.listenerCount ? t.listenerCount(i) : v.call(t, i) }, r.prototype.listenerCount = v, r.prototype.eventNames = function() { return this.Gh > 0 ? i(this.jh) : [] } }, 7738: function(t, i, n) { var s, e; void 0 === (e = "function" == typeof(s = function() { "use strict"; function i(t, i) { return void 0 === i ? i = { autoBom: !1 } : "object" != typeof i && (i = { autoBom: !i }), i.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type) ? new Blob(["\ufeff", t], { type: t.type }) : t } function s(t, i, n) { var s = new XMLHttpRequest; s.open("GET", t), s.responseType = "blob", s.onload = function() { u(s.response, i, n) }, s.onerror = function() {}, s.send() } function e(t) { var i = new XMLHttpRequest; i.open("HEAD", t, !1); try { i.send() } catch (t) {} return 200 <= i.status && 299 >= i.status } function r(t) { try { t.dispatchEvent(new MouseEvent("click")) } catch (n) { var i = document.createEvent("MouseEvents"); i.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), t.dispatchEvent(i) } } var h = "object" == typeof window && window.window === window ? window : "object" == typeof self && self.self === self ? self : "object" == typeof n.g && n.g.global === n.g ? n.g : void 0, o = h.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), u = h.saveAs || ("object" != typeof window || window !== h ? function() {} : "download" in HTMLAnchorElement.prototype && !o ? function(t, i, n) { var o = h.URL || h.webkitURL, u = document.createElement("a"); u.download = i = i || t.name || "download", u.rel = "noopener", "string" == typeof t ? (u.href = t, u.origin === location.origin ? r(u) : e(u.href) ? s(t, i, n) : r(u, u.target = "_blank")) : (u.href = o.createObjectURL(t), setTimeout((function() { o.revokeObjectURL(u.href) }), 4e4), setTimeout((function() { r(u) }), 0)) } : "msSaveOrOpenBlob" in navigator ? function(t, n, h) { if (n = n || t.name || "download", "string" != typeof t) navigator.msSaveOrOpenBlob(i(t, h), n); else if (e(t)) s(t, n, h); else { var o = document.createElement("a"); o.href = t, o.target = "_blank", setTimeout((function() { r(o) })) } } : function(t, i, n, e) { if ((e = e || open("", "_blank")) && (e.document.title = e.document.body.innerText = "downloading..."), "string" == typeof t) return s(t, i, n); var r = "application/octet-stream" === t.type, u = /constructor/i.test(h.HTMLElement) || h.safari, a = /CriOS\/[\d]+/.test(navigator.userAgent); if ((a || r && u || o) && "undefined" != typeof FileReader) { var l = new FileReader; l.onloadend = function() { var t = l.result; t = a ? t : t.replace(/^data:[^;]*;/, "data:attachment/file;"), e ? e.location.href = t : location = t, e = null }, l.readAsDataURL(t) } else { var c = h.URL || h.webkitURL, f = c.createObjectURL(t); e ? e.location = f : location.href = f, e = null, setTimeout((function() { c.revokeObjectURL(f) }), 4e4) } }); h.saveAs = u.saveAs = u, t.exports = u }) ? s.apply(i, []) : s) || (t.exports = e) }, 7373: t => { ! function() { function i(t, i) { document.addEventListener ? t.addEventListener("scroll", i, !1) : t.attachEvent("scroll", i) } function n(t) { this.a = document.createElement("div"), this.a.setAttribute("aria-hidden", "true"), this.a.appendChild(document.createTextNode(t)), this.b = document.createElement("span"), this.c = document.createElement("span"), this.h = document.createElement("span"), this.f = document.createElement("span"), this.g = -1, this.b.style.cssText = "max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;", this.c.style.cssText = "max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;", this.f.style.cssText = "max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;", this.h.style.cssText = "display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;", this.b.appendChild(this.h), this.c.appendChild(this.f), this.a.appendChild(this.b), this.a.appendChild(this.c) } function s(t, i) { t.a.style.cssText = "max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:" + i + ";" } function e(t) { var i = t.a.offsetWidth, n = i + 100; return t.f.style.width = n + "px", t.c.scrollLeft = n, t.b.scrollLeft = t.b.scrollWidth + 100, t.g !== i && (t.g = i, !0) } function r(t, n) { function s() { var t = r; e(t) && t.a.parentNode && n(t.g) } var r = t; i(t.b, s), i(t.c, s), e(t) } function h(t, i) { var n = i || {}; this.family = t, this.style = n.style || "normal", this.weight = n.weight || "normal", this.stretch = n.stretch || "normal" } var o = null, u = null, a = null, l = null; function c() { return null === l && (l = !!document.fonts), l } function f() { if (null === a) { var t = document.createElement("div"); try { t.style.font = "condensed 100px sans-serif" } catch (t) {} a = "" !== t.style.font } return a } function v(t, i) { return [t.style, t.weight, f() ? t.stretch : "", "100px", i].join(" ") } h.prototype.load = function(t, i) { var e = this, h = t || "BESbswy", a = 0, l = i || 3e3, f = (new Date).getTime(); return new Promise((function(t, i) { if (c() && ! function() { if (null === u) if (c() && /Apple/.test(window.navigator.vendor)) { var t = /AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent); u = !!t && 603 > parseInt(t[1], 10) } else u = !1; return u }()) { var d = new Promise((function(t, i) { ! function n() { (new Date).getTime() - f >= l ? i(Error(l + "ms timeout exceeded")) : document.fonts.load(v(e, '"' + e.family + '"'), h).then((function(i) { 1 <= i.length ? t() : setTimeout(n, 25) }), i) }() })), _ = new Promise((function(t, i) { a = setTimeout((function() { i(Error(l + "ms timeout exceeded")) }), l) })); Promise.race([_, d]).then((function() { clearTimeout(a), t(e) }), i) } else ! function(t) { document.body ? t() : document.addEventListener ? document.addEventListener("DOMContentLoaded", (function i() { document.removeEventListener("DOMContentLoaded", i), t() })) : document.attachEvent("onreadystatechange", (function i() { "interactive" != document.readyState && "complete" != document.readyState || (document.detachEvent("onreadystatechange", i), t()) })) }((function() { function u() { var i; (i = -1 != p && -1 != m || -1 != p && -1 != b || -1 != m && -1 != b) && ((i = p != m && p != b && m != b) || (null === o && (i = /AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent), o = !!i && (536 > parseInt(i[1], 10) || 536 === parseInt(i[1], 10) && 11 >= parseInt(i[2], 10))), i = o && (p == w && m == w && b == w || p == g && m == g && b == g || p == y && m == y && b == y)), i = !i), i && (E.parentNode && E.parentNode.removeChild(E), clearTimeout(a), t(e)) } var c = new n(h), d = new n(h), _ = new n(h), p = -1, m = -1, b = -1, w = -1, g = -1, y = -1, E = document.createElement("div"); E.dir = "ltr", s(c, v(e, "sans-serif")), s(d, v(e, "serif")), s(_, v(e, "monospace")), E.appendChild(c.a), E.appendChild(d.a), E.appendChild(_.a), document.body.appendChild(E), w = c.a.offsetWidth, g = d.a.offsetWidth, y = _.a.offsetWidth, function t() { if ((new Date).getTime() - f >= l) E.parentNode && E.parentNode.removeChild(E), i(Error(l + "ms timeout exceeded")); else { var n = document.hidden; !0 !== n && void 0 !== n || (p = c.a.offsetWidth, m = d.a.offsetWidth, b = _.a.offsetWidth, u()), a = setTimeout(t, 50) } }(), r(c, (function(t) { p = t, u() })), s(c, v(e, '"' + e.family + '",sans-serif')), r(d, (function(t) { m = t, u() })), s(d, v(e, '"' + e.family + '",serif')), r(_, (function(t) { b = t, u() })), s(_, v(e, '"' + e.family + '",monospace')) })) })) }, t.exports = h }() }, 4587: t => { "use strict"; var i = Array.prototype.slice, n = Object.prototype.toString; t.exports = function(t) { var s = this; if ("function" != typeof s || "[object Function]" !== n.call(s)) throw new TypeError("Function.prototype.bind called on incompatible " + s); for (var e, r = i.call(arguments, 1), h = Math.max(0, s.length - r.length), o = [], u = 0; u < h; u++) o.push("$" + u); if (e = Function("binder", "return function (" + o.join(",") + "){ return binder.apply(this,arguments); }")((function() { if (this instanceof e) { var n = s.apply(this, r.concat(i.call(arguments))); return Object(n) === n ? n : this } return s.apply(t, r.concat(i.call(arguments))) })), s.prototype) { var a = function() {}; a.prototype = s.prototype, e.prototype = new a, a.prototype = null } return e } }, 7535: (t, i, n) => { "use strict"; var s = n(4587); t.exports = Function.prototype.bind || s }, 3362: (t, i, n) => { "use strict"; var s, e = SyntaxError, r = Function, h = TypeError, o = function(t) { try { return r('"use strict"; return (' + t + ").constructor;")() } catch (t) {} }, u = Object.getOwnPropertyDescriptor; if (u) try { u({}, "") } catch (t) { u = null } var a = function() { throw new h }, l = u ? function() { try { return a } catch (t) { try { return u(arguments, "callee").get } catch (t) { return a } } }() : a, c = n(721)(), f = n(3709)(), v = Object.getPrototypeOf || (f ? function(t) { return t.__proto__ } : null), d = {}, _ = "undefined" != typeof Uint8Array && v ? v(Uint8Array) : s, p = { "%AggregateError%": "undefined" == typeof AggregateError ? s : AggregateError, "%Array%": Array, "%ArrayBuffer%": "undefined" == typeof ArrayBuffer ? s : ArrayBuffer, "%ArrayIteratorPrototype%": c && v ? v([][Symbol.iterator]()) : s, "%AsyncFromSyncIteratorPrototype%": s, "%AsyncFunction%": d, "%AsyncGenerator%": d, "%AsyncGeneratorFunction%": d, "%AsyncIteratorPrototype%": d, "%Atomics%": "undefined" == typeof Atomics ? s : Atomics, "%BigInt%": "undefined" == typeof BigInt ? s : BigInt, "%BigInt64Array%": "undefined" == typeof BigInt64Array ? s : BigInt64Array, "%BigUint64Array%": "undefined" == typeof BigUint64Array ? s : BigUint64Array, "%Boolean%": Boolean, "%DataView%": "undefined" == typeof DataView ? s : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": Error, "%eval%": eval, "%EvalError%": EvalError, "%Float32Array%": "undefined" == typeof Float32Array ? s : Float32Array, "%Float64Array%": "undefined" == typeof Float64Array ? s : Float64Array, "%FinalizationRegistry%": "undefined" == typeof FinalizationRegistry ? s : FinalizationRegistry, "%Function%": r, "%GeneratorFunction%": d, "%Int8Array%": "undefined" == typeof Int8Array ? s : Int8Array, "%Int16Array%": "undefined" == typeof Int16Array ? s : Int16Array, "%Int32Array%": "undefined" == typeof Int32Array ? s : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": c && v ? v(v([][Symbol.iterator]())) : s, "%JSON%": "object" == typeof JSON ? JSON : s, "%Map%": "undefined" == typeof Map ? s : Map, "%MapIteratorPrototype%": "undefined" != typeof Map && c && v ? v((new Map)[Symbol.iterator]()) : s, "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": "undefined" == typeof Promise ? s : Promise, "%Proxy%": "undefined" == typeof Proxy ? s : Proxy, "%RangeError%": RangeError, "%ReferenceError%": ReferenceError, "%Reflect%": "undefined" == typeof Reflect ? s : Reflect, "%RegExp%": RegExp, "%Set%": "undefined" == typeof Set ? s : Set, "%SetIteratorPrototype%": "undefined" != typeof Set && c && v ? v((new Set)[Symbol.iterator]()) : s, "%SharedArrayBuffer%": "undefined" == typeof SharedArrayBuffer ? s : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": c && v ? v("" [Symbol.iterator]()) : s, "%Symbol%": c ? Symbol : s, "%SyntaxError%": e, "%ThrowTypeError%": l, "%TypedArray%": _, "%TypeError%": h, "%Uint8Array%": "undefined" == typeof Uint8Array ? s : Uint8Array, "%Uint8ClampedArray%": "undefined" == typeof Uint8ClampedArray ? s : Uint8ClampedArray, "%Uint16Array%": "undefined" == typeof Uint16Array ? s : Uint16Array, "%Uint32Array%": "undefined" == typeof Uint32Array ? s : Uint32Array, "%URIError%": URIError, "%WeakMap%": "undefined" == typeof WeakMap ? s : WeakMap, "%WeakRef%": "undefined" == typeof WeakRef ? s : WeakRef, "%WeakSet%": "undefined" == typeof WeakSet ? s : WeakSet }; if (v) try { null.error } catch (t) { var m = v(v(t)); p["%Error.prototype%"] = m } var b = function t(i) { var n; if ("%AsyncFunction%" === i) n = o("async function () {}"); else if ("%GeneratorFunction%" === i) n = o("function* () {}"); else if ("%AsyncGeneratorFunction%" === i) n = o("async function* () {}"); else if ("%AsyncGenerator%" === i) { var s = t("%AsyncGeneratorFunction%"); s && (n = s.prototype) } else if ("%AsyncIteratorPrototype%" === i) { var e = t("%AsyncGenerator%"); e && v && (n = v(e.prototype)) } return p[i] = n, n }, w = { "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, g = n(7535), y = n(7178), E = g.call(Function.call, Array.prototype.concat), S = g.call(Function.apply, Array.prototype.splice), A = g.call(Function.call, String.prototype.replace), T = g.call(Function.call, String.prototype.slice), M = g.call(Function.call, RegExp.prototype.exec), O = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, I = /\\(\\)?/g, N = function(t, i) { var n, s = t; if (y(w, s) && (s = "%" + (n = w[s])[0] + "%"), y(p, s)) { var r = p[s]; if (r === d && (r = b(s)), void 0 === r && !i) throw new h("intrinsic " + t + " exists, but is not available. Please file an issue!"); return { alias: n, name: s, value: r } } throw new e("intrinsic " + t + " does not exist!") }; t.exports = function(t, i) { if ("string" != typeof t || 0 === t.length) throw new h("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof i) throw new h('"allowMissing" argument must be a boolean'); if (null === M(/^%?[^%]*%?$/, t)) throw new e("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); var n = function(t) { var i = T(t, 0, 1), n = T(t, -1); if ("%" === i && "%" !== n) throw new e("invalid intrinsic syntax, expected closing `%`"); if ("%" === n && "%" !== i) throw new e("invalid intrinsic syntax, expected opening `%`"); var s = []; return A(t, O, (function(t, i, n, e) { s[s.length] = n ? A(e, I, "$1") : i || t })), s }(t), s = n.length > 0 ? n[0] : "", r = N("%" + s + "%", i), o = r.name, a = r.value, l = !1, c = r.alias; c && (s = c[0], S(n, E([0, 1], c))); for (var f = 1, v = !0; f < n.length; f += 1) { var d = n[f], _ = T(d, 0, 1), m = T(d, -1); if (('"' === _ || "'" === _ || "`" === _ || '"' === m || "'" === m || "`" === m) && _ !== m) throw new e("property names with quotes must have matching quotes"); if ("constructor" !== d && v || (l = !0), y(p, o = "%" + (s += "." + d) + "%")) a = p[o]; else if (null != a) { if (!(d in a)) { if (!i) throw new h("base intrinsic for " + t + " exists, but the property is not available."); return } if (u && f + 1 >= n.length) { var b = u(a, d); a = (v = !!b) && "get" in b && !("originalValue" in b.get) ? b.get : a[d] } else v = y(a, d), a = a[d]; v && !l && (p[o] = a) } } return a } }, 3709: t => { "use strict"; var i = { foo: {} }, n = Object; t.exports = function() { return { __proto__: i }.foo === i.foo && !({ __proto__: null } instanceof n) } }, 721: (t, i, n) => { "use strict"; var s = "undefined" != typeof Symbol && Symbol, e = n(8981); t.exports = function() { return "function" == typeof s && ("function" == typeof Symbol && ("symbol" == typeof s("foo") && ("symbol" == typeof Symbol("bar") && e()))) } }, 8981: t => { "use strict"; t.exports = function() { if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; if ("symbol" == typeof Symbol.iterator) return !0; var t = {}, i = Symbol("test"), n = Object(i); if ("string" == typeof i) return !1; if ("[object Symbol]" !== Object.prototype.toString.call(i)) return !1; if ("[object Symbol]" !== Object.prototype.toString.call(n)) return !1; for (i in t[i] = 42, t) return !1; if ("function" == typeof Object.keys && 0 !== Object.keys(t).length) return !1; if ("function" == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(t).length) return !1; var s = Object.getOwnPropertySymbols(t); if (1 !== s.length || s[0] !== i) return !1; if (!Object.prototype.propertyIsEnumerable.call(t, i)) return !1; if ("function" == typeof Object.getOwnPropertyDescriptor) { var e = Object.getOwnPropertyDescriptor(t, i); if (42 !== e.value || !0 !== e.enumerable) return !1 } return !0 } }, 7178: (t, i, n) => { "use strict"; var s = n(7535); t.exports = s.call(Function.call, Object.prototype.hasOwnProperty) }, 7171: (t, i, n) => { var s; /*! howler.js v2.2.4 | (c) 2013-2020, James Simpson of GoldFire Studios | MIT License | howlerjs.com */ ! function() { "use strict"; var e = function() { this.init() }; e.prototype = { init: function() { var t = this || r; return t.Hh = 1e3, t.Xh = [], t.html5PoolSize = 10, t.Vh = {}, t.$h = [], t.Yh = !1, t.zh = 1, t.Kh = "canplaythrough", t.qh = "undefined" != typeof window && window.navigator ? window.navigator : null, t.masterGain = null, t.noAudio = !1, t.usingWebAudio = !0, t.autoSuspend = !0, t.ctx = null, t.autoUnlock = !0, t.Zh(), t }, volume: function(t) { var i = this || r; if (t = parseFloat(t), i.ctx || v(), void 0 !== t && t >= 0 && t <= 1) { if (i.zh = t, i.Yh) return i; i.usingWebAudio && i.masterGain.gain.setValueAtTime(t, r.ctx.currentTime); for (var n = 0; n < i.$h.length; n++) if (!i.$h[n].Jh) for (var s = i.$h[n].Qh(), e = 0; e < s.length; e++) { var h = i.$h[n].io(s[e]); h && h.no && (h.no.volume = h.zh * t) } return i } return i.zh }, mute: function(t) { var i = this || r; i.ctx || v(), i.Yh = t, i.usingWebAudio && i.masterGain.gain.setValueAtTime(t ? 0 : i.zh, r.ctx.currentTime); for (var n = 0; n < i.$h.length; n++) if (!i.$h[n].Jh) for (var s = i.$h[n].Qh(), e = 0; e < s.length; e++) { var h = i.$h[n].io(s[e]); h && h.no && (h.no.muted = !!t || h.Yh) } return i }, stop: function() { for (var t = this || r, i = 0; i < t.$h.length; i++) t.$h[i].stop(); return t }, unload: function() { for (var t = this || r, i = t.$h.length - 1; i >= 0; i--) t.$h[i].unload(); return t.usingWebAudio && t.ctx && void 0 !== t.ctx.close && (t.ctx.close(), t.ctx = null, v()), t }, codecs: function(t) { return (this || r).Vh[t.replace(/^x-/, "")] }, Zh: function() { var t = this || r; if (t.state = t.ctx && t.ctx.state || "suspended", t.so(), !t.usingWebAudio) if ("undefined" != typeof Audio) try { void 0 === (new Audio).oncanplaythrough && (t.Kh = "canplay") } catch (i) { t.noAudio = !0 } else t.noAudio = !0; try { (new Audio).muted && (t.noAudio = !0) } catch (t) {} return t.noAudio || t.eo(), t }, eo: function() { var t = this || r, i = null; try { i = "undefined" != typeof Audio ? new Audio : null } catch (i) { return t } if (!i || "function" != typeof i.canPlayType) return t; var n = i.canPlayType("audio/mpeg;").replace(/^no$/, ""), s = t.qh ? t.qh.userAgent : "", e = s.match(/OPR\/(\d+)/g), h = e && parseInt(e[0].split("/")[1], 10) < 33, o = -1 !== s.indexOf("Safari") && -1 === s.indexOf("Chrome"), u = s.match(/Version\/(.*?) /), a = o && u && parseInt(u[1], 10) < 15; return t.Vh = { mp3: !(h || !n && !i.canPlayType("audio/mp3;").replace(/^no$/, "")), mpeg: !!n, opus: !!i.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ""), ogg: !!i.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), oga: !!i.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), wav: !!(i.canPlayType('audio/wav; codecs="1"') || i.canPlayType("audio/wav")).replace(/^no$/, ""), aac: !!i.canPlayType("audio/aac;").replace(/^no$/, ""), caf: !!i.canPlayType("audio/x-caf;").replace(/^no$/, ""), m4a: !!(i.canPlayType("audio/x-m4a;") || i.canPlayType("audio/m4a;") || i.canPlayType("audio/aac;")).replace(/^no$/, ""), m4b: !!(i.canPlayType("audio/x-m4b;") || i.canPlayType("audio/m4b;") || i.canPlayType("audio/aac;")).replace(/^no$/, ""), mp4: !!(i.canPlayType("audio/x-mp4;") || i.canPlayType("audio/mp4;") || i.canPlayType("audio/aac;")).replace(/^no$/, ""), weba: !(a || !i.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")), webm: !(a || !i.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")), dolby: !!i.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/, ""), flac: !!(i.canPlayType("audio/x-flac;") || i.canPlayType("audio/flac;")).replace(/^no$/, "") }, t }, ro: function() { var t = this || r; if (!t.ho && t.ctx) { t.ho = !1, t.autoUnlock = !1, t.uo || 44100 === t.ctx.sampleRate || (t.uo = !0, t.unload()), t.ao = t.ctx.createBuffer(1, 1, 22050); var i = function(n) { for (; t.Xh.length < t.html5PoolSize;) try { var s = new Audio; s.lo = !0, t.co(s) } catch (i) { t.noAudio = !0; break } for (var e = 0; e < t.$h.length; e++) if (!t.$h[e].Jh) for (var r = t.$h[e].Qh(), h = 0; h < r.length; h++) { var o = t.$h[e].io(r[h]); o && o.no && !o.no.lo && (o.no.lo = !0, o.no.load()) } t.fo(); var u = t.ctx.createBufferSource(); u.buffer = t.ao, u.connect(t.ctx.destination), void 0 === u.start ? u.noteOn(0) : u.start(0), "function" == typeof t.ctx.resume && t.ctx.resume(), u.onended = function() { u.disconnect(0), t.ho = !0, document.removeEventListener("touchstart", i, !0), document.removeEventListener("touchend", i, !0), document.removeEventListener("click", i, !0), document.removeEventListener("keydown", i, !0); for (var n = 0; n < t.$h.length; n++) t.$h[n].vo("unlock") } }; return document.addEventListener("touchstart", i, !0), document.addEventListener("touchend", i, !0), document.addEventListener("click", i, !0), document.addEventListener("keydown", i, !0), t } }, do: function() { var t = this || r; if (t.Xh.length) return t.Xh.pop(); var i = (new Audio).play(); return i && "undefined" != typeof Promise && (i instanceof Promise || "function" == typeof i.then) && i.catch((function() {})), new Audio }, co: function(t) { var i = this || r; return t.lo && i.Xh.push(t), i }, so: function() { var t = this; if (t.autoSuspend && t.ctx && void 0 !== t.ctx.suspend && r.usingWebAudio) { for (var i = 0; i < t.$h.length; i++) if (t.$h[i].Jh) for (var n = 0; n < t.$h[i]._o.length; n++) if (!t.$h[i]._o[n].po) return t; return t.mo && clearTimeout(t.mo), t.mo = setTimeout((function() { if (t.autoSuspend) { t.mo = null, t.state = "suspending"; var i = function() { t.state = "suspended", t.bo && (delete t.bo, t.fo()) }; t.ctx.suspend().then(i, i) } }), 3e4), t } }, fo: function() { var t = this; if (t.ctx && void 0 !== t.ctx.resume && r.usingWebAudio) return "running" === t.state && "interrupted" !== t.ctx.state && t.mo ? (clearTimeout(t.mo), t.mo = null) : "suspended" === t.state || "running" === t.state && "interrupted" === t.ctx.state ? (t.ctx.resume().then((function() { t.state = "running"; for (var i = 0; i < t.$h.length; i++) t.$h[i].vo("resume") })), t.mo && (clearTimeout(t.mo), t.mo = null)) : "suspending" === t.state && (t.bo = !0), t } }; var r = new e, h = function(t) { t.src && 0 !== t.src.length && this.init(t) }; h.prototype = { init: function(t) { var i = this; return r.ctx || v(), i.wo = t.autoplay || !1, i.yo = "string" != typeof t.format ? t.format : [t.format], i.Eo = t.html5 || !1, i.Yh = t.mute || !1, i.So = t.loop || !1, i.Ao = t.pool || 5, i.To = "boolean" != typeof t.preload && "metadata" !== t.preload || t.preload, i.Mo = t.rate || 1, i.Oo = t.sprite || {}, i.Io = "string" != typeof t.src ? t.src : [t.src], i.zh = void 0 !== t.volume ? t.volume : 1, i.No = { method: t.xhr && t.xhr.method ? t.xhr.method : "GET", headers: t.xhr && t.xhr.headers ? t.xhr.headers : null, withCredentials: !(!t.xhr || !t.xhr.withCredentials) && t.xhr.withCredentials }, i.Ro = 0, i.Po = "unloaded", i._o = [], i.xo = {}, i.Un = [], i.Lo = !1, i._onend = t.onend ? [{ fn: t.onend }] : [], i._onfade = t.onfade ? [{ fn: t.onfade }] : [], i._onload = t.onload ? [{ fn: t.onload }] : [], i._onloaderror = t.onloaderror ? [{ fn: t.onloaderror }] : [], i._onplayerror = t.onplayerror ? [{ fn: t.onplayerror }] : [], i._onpause = t.onpause ? [{ fn: t.onpause }] : [], i._onplay = t.onplay ? [{ fn: t.onplay }] : [], i._onstop = t.onstop ? [{ fn: t.onstop }] : [], i._onmute = t.onmute ? [{ fn: t.onmute }] : [], i._onvolume = t.onvolume ? [{ fn: t.onvolume }] : [], i._onrate = t.onrate ? [{ fn: t.onrate }] : [], i._onseek = t.onseek ? [{ fn: t.onseek }] : [], i._onunlock = t.onunlock ? [{ fn: t.onunlock }] : [], i._onresume = [], i.Jh = r.usingWebAudio && !i.Eo, void 0 !== r.ctx && r.ctx && r.autoUnlock && r.ro(), r.$h.push(i), i.wo && i.Un.push({ event: "play", action: function() { i.play() } }), i.To && "none" !== i.To && i.load(), i }, load: function() { var t = this, i = null; if (!r.noAudio) { "string" == typeof t.Io && (t.Io = [t.Io]); for (var n = 0; n < t.Io.length; n++) { var s, e; if (t.yo && t.yo[n]) s = t.yo[n]; else { if ("string" != typeof(e = t.Io[n])) { t.vo("loaderror", null, "Non-string found in selected audio sources - ignoring."); continue }(s = /^data:audio\/([^;,]+);/i.exec(e)) || (s = /\.([^.]+)$/.exec(e.split("?", 1)[0])), s && (s = s[1].toLowerCase()) } if (s && r.codecs(s)) { i = t.Io[n]; break } } return i ? (t.Io = i, t.Po = "loading", "https:" === window.location.protocol && "http:" === i.slice(0, 5) && (t.Eo = !0, t.Jh = !1), new o(t), t.Jh && a(t), t) : void t.vo("loaderror", null, "No codec support for selected audio sources.") } t.vo("loaderror", null, "No audio support.") }, play: function(t, i) { var n = this, s = null; if ("number" == typeof t) s = t, t = null; else { if ("string" == typeof t && "loaded" === n.Po && !n.Oo[t]) return null; if (void 0 === t && (t = "__default", !n.Lo)) { for (var e = 0, h = 0; h < n._o.length; h++) n._o[h].po && !n._o[h].Co && (e++, s = n._o[h].Uo); 1 === e ? t = null : s = null } } var o = s ? n.io(s) : n.ko(); if (!o) return null; if (s && !t && (t = o.Oo || "__default"), "loaded" !== n.Po) { o.Oo = t, o.Co = !1; var u = o.Uo; return n.Un.push({ event: "play", action: function() { n.play(u) } }), u } if (s && !o.po) return i || n.Fo("play"), o.Uo; n.Jh && r.fo(); var a = Math.max(0, o.Bo > 0 ? o.Bo : n.Oo[t][0] / 1e3), l = Math.max(0, (n.Oo[t][0] + n.Oo[t][1]) / 1e3 - a), c = 1e3 * l / Math.abs(o.Mo), f = n.Oo[t][0] / 1e3, v = (n.Oo[t][0] + n.Oo[t][1]) / 1e3; o.Oo = t, o.Co = !1; var d = function() { o.po = !1, o.Bo = a, o.Do = f, o.jo = v, o.So = !(!o.So && !n.Oo[t][2]) }; if (!(a >= v)) { var _ = o.no; if (n.Jh) { var p = function() { n.Lo = !1, d(), n.Go(o), _.gain.setValueAtTime(o.Yh || n.Yh ? 0 : o.zh, r.ctx.currentTime), o.Wo = r.ctx.currentTime, void 0 === _.bufferSource.start ? _.bufferSource.noteGrainOn(0, a, o.So ? 86400 : l) : _.bufferSource.start(0, a, o.So ? 86400 : l), c !== 1 / 0 && (n.xo[o.Uo] = setTimeout(n.Co.bind(n, o), c)), i || setTimeout((function() { n.vo("play", o.Uo), n.Fo() }), 0) }; "running" === r.state && "interrupted" !== r.ctx.state ? p() : (n.Lo = !0, n.once("resume", p), n.Ho(o.Uo)) } else { var m = function() { _.currentTime = a, _.muted = o.Yh || n.Yh || r.Yh || _.muted, _.volume = o.zh * r.volume(), _.playbackRate = o.Mo; try { var s = _.play(); if (s && "undefined" != typeof Promise && (s instanceof Promise || "function" == typeof s.then) ? (n.Lo = !0, d(), s.then((function() { n.Lo = !1, _.lo = !0, i ? n.Fo() : n.vo("play", o.Uo) })).catch((function() { n.Lo = !1, n.vo("playerror", o.Uo, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."), o.Co = !0, o.po = !0 }))) : i || (n.Lo = !1, d(), n.vo("play", o.Uo)), _.playbackRate = o.Mo, _.paused) return void n.vo("playerror", o.Uo, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."); "__default" !== t || o.So ? n.xo[o.Uo] = setTimeout(n.Co.bind(n, o), c) : (n.xo[o.Uo] = function() { n.Co(o), _.removeEventListener("ended", n.xo[o.Uo], !1) }, _.addEventListener("ended", n.xo[o.Uo], !1)) } catch (t) { n.vo("playerror", o.Uo, t) } }; "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" === _.src && (_.src = n.Io, _.load()); var b = window && window.ejecta || !_.readyState && r.qh.isCocoonJS; if (_.readyState >= 3 || b) m(); else { n.Lo = !0, n.Po = "loading"; var w = function() { n.Po = "loaded", m(), _.removeEventListener(r.Kh, w, !1) }; _.addEventListener(r.Kh, w, !1), n.Ho(o.Uo) } } return o.Uo } n.Co(o) }, pause: function(t) { var i = this; if ("loaded" !== i.Po || i.Lo) return i.Un.push({ event: "pause", action: function() { i.pause(t) } }), i; for (var n = i.Qh(t), s = 0; s < n.length; s++) { i.Ho(n[s]); var e = i.io(n[s]); if (e && !e.po && (e.Bo = i.seek(n[s]), e.Xo = 0, e.po = !0, i.Vo(n[s]), e.no)) if (i.Jh) { if (!e.no.bufferSource) continue; void 0 === e.no.bufferSource.stop ? e.no.bufferSource.noteOff(0) : e.no.bufferSource.stop(0), i.$o(e.no) } else isNaN(e.no.duration) && e.no.duration !== 1 / 0 || e.no.pause(); arguments[1] || i.vo("pause", e ? e.Uo : null) } return i }, stop: function(t, i) { var n = this; if ("loaded" !== n.Po || n.Lo) return n.Un.push({ event: "stop", action: function() { n.stop(t) } }), n; for (var s = n.Qh(t), e = 0; e < s.length; e++) { n.Ho(s[e]); var r = n.io(s[e]); r && (r.Bo = r.Do || 0, r.Xo = 0, r.po = !0, r.Co = !0, n.Vo(s[e]), r.no && (n.Jh ? r.no.bufferSource && (void 0 === r.no.bufferSource.stop ? r.no.bufferSource.noteOff(0) : r.no.bufferSource.stop(0), n.$o(r.no)) : isNaN(r.no.duration) && r.no.duration !== 1 / 0 || (r.no.currentTime = r.Do || 0, r.no.pause(), r.no.duration === 1 / 0 && n.Yo(r.no))), i || n.vo("stop", r.Uo)) } return n }, mute: function(t, i) { var n = this; if ("loaded" !== n.Po || n.Lo) return n.Un.push({ event: "mute", action: function() { n.mute(t, i) } }), n; if (void 0 === i) { if ("boolean" != typeof t) return n.Yh; n.Yh = t } for (var s = n.Qh(i), e = 0; e < s.length; e++) { var h = n.io(s[e]); h && (h.Yh = t, h.zo && n.Vo(h.Uo), n.Jh && h.no ? h.no.gain.setValueAtTime(t ? 0 : h.zh, r.ctx.currentTime) : h.no && (h.no.muted = !!r.Yh || t), n.vo("mute", h.Uo)) } return n }, volume: function() { var t, i, n, s = this, e = arguments; if (0 === e.length) return s.zh; if (1 === e.length || 2 === e.length && void 0 === e[1] ? s.Qh().indexOf(e[0]) >= 0 ? i = parseInt(e[0], 10) : t = parseFloat(e[0]) : e.length >= 2 && (t = parseFloat(e[0]), i = parseInt(e[1], 10)), !(void 0 !== t && t >= 0 && t <= 1)) return (n = i ? s.io(i) : s._o[0]) ? n.zh : 0; if ("loaded" !== s.Po || s.Lo) return s.Un.push({ event: "volume", action: function() { s.volume.apply(s, e) } }), s; void 0 === i && (s.zh = t), i = s.Qh(i); for (var h = 0; h < i.length; h++)(n = s.io(i[h])) && (n.zh = t, e[2] || s.Vo(i[h]), s.Jh && n.no && !n.Yh ? n.no.gain.setValueAtTime(t, r.ctx.currentTime) : n.no && !n.Yh && (n.no.volume = t * r.volume()), s.vo("volume", n.Uo)); return s }, fade: function(t, i, n, s) { var e = this; if ("loaded" !== e.Po || e.Lo) return e.Un.push({ event: "fade", action: function() { e.fade(t, i, n, s) } }), e; t = Math.min(Math.max(0, parseFloat(t)), 1), i = Math.min(Math.max(0, parseFloat(i)), 1), n = parseFloat(n), e.volume(t, s); for (var h = e.Qh(s), o = 0; o < h.length; o++) { var u = e.io(h[o]); if (u) { if (s || e.Vo(h[o]), e.Jh && !u.Yh) { var a = r.ctx.currentTime, l = a + n / 1e3; u.zh = t, u.no.gain.setValueAtTime(t, a), u.no.gain.linearRampToValueAtTime(i, l) } e.Ko(u, t, i, n, h[o], void 0 === s) } } return e }, Ko: function(t, i, n, s, e, r) { var h = this, o = i, u = n - i, a = Math.abs(u / .01), l = Math.max(4, a > 0 ? s / a : s), c = Date.now(); t.qo = n, t.zo = setInterval((function() { var e = (Date.now() - c) / s; c = Date.now(), o += u * e, o = Math.round(100 * o) / 100, o = u < 0 ? Math.max(n, o) : Math.min(n, o), h.Jh ? t.zh = o : h.volume(o, t.Uo, !0), r && (h.zh = o), (n < i && o <= n || n > i && o >= n) && (clearInterval(t.zo), t.zo = null, t.qo = null, h.volume(n, t.Uo), h.vo("fade", t.Uo)) }), l) }, Vo: function(t) { var i = this, n = i.io(t); return n && n.zo && (i.Jh && n.no.gain.cancelScheduledValues(r.ctx.currentTime), clearInterval(n.zo), n.zo = null, i.volume(n.qo, t), n.qo = null, i.vo("fade", t)), i }, loop: function() { var t, i, n, s = this, e = arguments; if (0 === e.length) return s.So; if (1 === e.length) { if ("boolean" != typeof e[0]) return !!(n = s.io(parseInt(e[0], 10))) && n.So; s.So = t = e[0] } else 2 === e.length && (t = e[0], i = parseInt(e[1], 10)); for (var r = s.Qh(i), h = 0; h < r.length; h++)(n = s.io(r[h])) && (n.So = t, s.Jh && n.no && n.no.bufferSource && (n.no.bufferSource.loop = t, t && (n.no.bufferSource.loopStart = n.Do || 0, n.no.bufferSource.loopEnd = n.jo, s.playing(r[h]) && (s.pause(r[h], !0), s.play(r[h], !0))))); return s }, rate: function() { var t, i, n, s = this, e = arguments; if (0 === e.length) i = s._o[0].Uo; else if (1 === e.length) { s.Qh().indexOf(e[0]) >= 0 ? i = parseInt(e[0], 10) : t = parseFloat(e[0]) } else 2 === e.length && (t = parseFloat(e[0]), i = parseInt(e[1], 10)); if ("number" != typeof t) return (n = s.io(i)) ? n.Mo : s.Mo; if ("loaded" !== s.Po || s.Lo) return s.Un.push({ event: "rate", action: function() { s.rate.apply(s, e) } }), s; void 0 === i && (s.Mo = t), i = s.Qh(i); for (var h = 0; h < i.length; h++) if (n = s.io(i[h])) { s.playing(i[h]) && (n.Xo = s.seek(i[h]), n.Wo = s.Jh ? r.ctx.currentTime : n.Wo), n.Mo = t, s.Jh && n.no && n.no.bufferSource ? n.no.bufferSource.playbackRate.setValueAtTime(t, r.ctx.currentTime) : n.no && (n.no.playbackRate = t); var o = s.seek(i[h]), u = 1e3 * ((s.Oo[n.Oo][0] + s.Oo[n.Oo][1]) / 1e3 - o) / Math.abs(n.Mo); !s.xo[i[h]] && n.po || (s.Ho(i[h]), s.xo[i[h]] = setTimeout(s.Co.bind(s, n), u)), s.vo("rate", n.Uo) } return s }, seek: function() { var t, i, n = this, s = arguments; if (0 === s.length) n._o.length && (i = n._o[0].Uo); else if (1 === s.length) { n.Qh().indexOf(s[0]) >= 0 ? i = parseInt(s[0], 10) : n._o.length && (i = n._o[0].Uo, t = parseFloat(s[0])) } else 2 === s.length && (t = parseFloat(s[0]), i = parseInt(s[1], 10)); if (void 0 === i) return 0; if ("number" == typeof t && ("loaded" !== n.Po || n.Lo)) return n.Un.push({ event: "seek", action: function() { n.seek.apply(n, s) } }), n; var e = n.io(i); if (e) { if (!("number" == typeof t && t >= 0)) { if (n.Jh) { var h = n.playing(i) ? r.ctx.currentTime - e.Wo : 0; return e.Bo + ((e.Xo ? e.Xo - e.Bo : 0) + h * Math.abs(e.Mo)) } return e.no.currentTime } var o = n.playing(i); o && n.pause(i, !0), e.Bo = t, e.Co = !1, n.Ho(i), n.Jh || !e.no || isNaN(e.no.duration) || (e.no.currentTime = t); var u = function() { o && n.play(i, !0), n.vo("seek", i) }; if (o && !n.Jh) { var a = function() { n.Lo ? setTimeout(a, 0) : u() }; setTimeout(a, 0) } else u() } return n }, playing: function(t) { var i = this; if ("number" == typeof t) { var n = i.io(t); return !!n && !n.po } for (var s = 0; s < i._o.length; s++) if (!i._o[s].po) return !0; return !1 }, duration: function(t) { var i = this, n = i.Ro, s = i.io(t); return s && (n = i.Oo[s.Oo][1] / 1e3), n }, state: function() { return this.Po }, unload: function() { for (var t = this, i = t._o, n = 0; n < i.length; n++) i[n].po || t.stop(i[n].Uo), t.Jh || (t.Yo(i[n].no), i[n].no.removeEventListener("error", i[n].Zo, !1), i[n].no.removeEventListener(r.Kh, i[n].Jo, !1), i[n].no.removeEventListener("ended", i[n].Qo, !1), r.co(i[n].no)), delete i[n].no, t.Ho(i[n].Uo); var s = r.$h.indexOf(t); s >= 0 && r.$h.splice(s, 1); var e = !0; for (n = 0; n < r.$h.length; n++) if (r.$h[n].Io === t.Io || t.Io.indexOf(r.$h[n].Io) >= 0) { e = !1; break } return u && e && delete u[t.Io], r.noAudio = !1, t.Po = "unloaded", t._o = [], t = null, null }, on: function(t, i, n, s) { return "function" == typeof i && this["_on" + t].push(s ? { id: n, fn: i, once: s } : { id: n, fn: i }), this }, off: function(t, i, n) { var s = this, e = s["_on" + t], r = 0; if ("number" == typeof i && (n = i, i = null), i || n) for (r = 0; r < e.length; r++) { var h = n === e[r].id; if (i === e[r].fn && h || !i && h) { e.splice(r, 1); break } } else if (t) s["_on" + t] = []; else { var o = Object.keys(s); for (r = 0; r < o.length; r++) 0 === o[r].indexOf("_on") && Array.isArray(s[o[r]]) && (s[o[r]] = []) } return s }, once: function(t, i, n) { return this.on(t, i, n, 1), this }, vo: function(t, i, n) { for (var s = this, e = s["_on" + t], r = e.length - 1; r >= 0; r--) e[r].id && e[r].id !== i && "load" !== t || (setTimeout(function(t) { t.call(this, i, n) }.bind(s, e[r].fn), 0), e[r].once && s.off(t, e[r].fn, e[r].id)); return s.Fo(t), s }, Fo: function(t) { var i = this; if (i.Un.length > 0) { var n = i.Un[0]; n.event === t && (i.Un.shift(), i.Fo()), t || n.action() } return i }, Co: function(t) { var i = this, n = t.Oo; if (!i.Jh && t.no && !t.no.paused && !t.no.ended && t.no.currentTime < t.jo) return setTimeout(i.Co.bind(i, t), 100), i; var s = !(!t.So && !i.Oo[n][2]); if (i.vo("end", t.Uo), !i.Jh && s && i.stop(t.Uo, !0).play(t.Uo), i.Jh && s) { i.vo("play", t.Uo), t.Bo = t.Do || 0, t.Xo = 0, t.Wo = r.ctx.currentTime; var e = 1e3 * (t.jo - t.Do) / Math.abs(t.Mo); i.xo[t.Uo] = setTimeout(i.Co.bind(i, t), e) } return i.Jh && !s && (t.po = !0, t.Co = !0, t.Bo = t.Do || 0, t.Xo = 0, i.Ho(t.Uo), i.$o(t.no), r.so()), i.Jh || s || i.stop(t.Uo, !0), i }, Ho: function(t) { var i = this; if (i.xo[t]) { if ("function" != typeof i.xo[t]) clearTimeout(i.xo[t]); else { var n = i.io(t); n && n.no && n.no.removeEventListener("ended", i.xo[t], !1) } delete i.xo[t] } return i }, io: function(t) { for (var i = this, n = 0; n < i._o.length; n++) if (t === i._o[n].Uo) return i._o[n]; return null }, ko: function() { var t = this; t.tu(); for (var i = 0; i < t._o.length; i++) if (t._o[i].Co) return t._o[i].reset(); return new o(t) }, tu: function() { var t = this, i = t.Ao, n = 0, s = 0; if (!(t._o.length < i)) { for (s = 0; s < t._o.length; s++) t._o[s].Co && n++; for (s = t._o.length - 1; s >= 0; s--) { if (n <= i) return; t._o[s].Co && (t.Jh && t._o[s].no && t._o[s].no.disconnect(0), t._o.splice(s, 1), n--) } } }, Qh: function(t) { if (void 0 === t) { for (var i = [], n = 0; n < this._o.length; n++) i.push(this._o[n].Uo); return i } return [t] }, Go: function(t) { return t.no.bufferSource = r.ctx.createBufferSource(), t.no.bufferSource.buffer = u[this.Io], t.no.bufferSource.connect(t.iu ? t.iu : t.no), t.no.bufferSource.loop = t.So, t.So && (t.no.bufferSource.loopStart = t.Do || 0, t.no.bufferSource.loopEnd = t.jo || 0), t.no.bufferSource.playbackRate.setValueAtTime(t.Mo, r.ctx.currentTime), this }, $o: function(t) { var i = r.qh && r.qh.vendor.indexOf("Apple") >= 0; if (!t.bufferSource) return this; if (r.ao && t.bufferSource && (t.bufferSource.onended = null, t.bufferSource.disconnect(0), i)) try { t.bufferSource.buffer = r.ao } catch (t) {} return t.bufferSource = null, this }, Yo: function(t) { /MSIE |Trident\//.test(r.qh && r.qh.userAgent) || (t.src = "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA") } }; var o = function(t) { this.nu = t, this.init() }; o.prototype = { init: function() { var t = this, i = t.nu; return t.Yh = i.Yh, t.So = i.So, t.zh = i.zh, t.Mo = i.Mo, t.Bo = 0, t.po = !0, t.Co = !0, t.Oo = "__default", t.Uo = ++r.Hh, i._o.push(t), t.create(), t }, create: function() { var t = this, i = t.nu, n = r.Yh || t.Yh || t.nu.Yh ? 0 : t.zh; return i.Jh ? (t.no = void 0 === r.ctx.createGain ? r.ctx.createGainNode() : r.ctx.createGain(), t.no.gain.setValueAtTime(n, r.ctx.currentTime), t.no.paused = !0, t.no.connect(r.masterGain)) : r.noAudio || (t.no = r.do(), t.Zo = t.su.bind(t), t.no.addEventListener("error", t.Zo, !1), t.Jo = t.eu.bind(t), t.no.addEventListener(r.Kh, t.Jo, !1), t.Qo = t.ru.bind(t), t.no.addEventListener("ended", t.Qo, !1), t.no.src = i.Io, t.no.preload = !0 === i.To ? "auto" : i.To, t.no.volume = n * r.volume(), t.no.load()), t }, reset: function() { var t = this, i = t.nu; return t.Yh = i.Yh, t.So = i.So, t.zh = i.zh, t.Mo = i.Mo, t.Bo = 0, t.Xo = 0, t.po = !0, t.Co = !0, t.Oo = "__default", t.Uo = ++r.Hh, t }, su: function() { var t = this; t.nu.vo("loaderror", t.Uo, t.no.error ? t.no.error.code : 0), t.no.removeEventListener("error", t.Zo, !1) }, eu: function() { var t = this, i = t.nu; i.Ro = Math.ceil(10 * t.no.duration) / 10, 0 === Object.keys(i.Oo).length && (i.Oo = { __default: [0, 1e3 * i.Ro] }), "loaded" !== i.Po && (i.Po = "loaded", i.vo("load"), i.Fo()), t.no.removeEventListener(r.Kh, t.Jo, !1) }, ru: function() { var t = this, i = t.nu; i.Ro === 1 / 0 && (i.Ro = Math.ceil(10 * t.no.duration) / 10, i.Oo.__default[1] === 1 / 0 && (i.Oo.__default[1] = 1e3 * i.Ro), i.Co(t)), t.no.removeEventListener("ended", t.Qo, !1) } }; var u = {}, a = function(t) { var i = t.Io; if (u[i]) return t.Ro = u[i].duration, void f(t); if (/^data:[^;]+;base64,/.test(i)) { for (var n = atob(i.split(",")[1]), s = new Uint8Array(n.length), e = 0; e < n.length; ++e) s[e] = n.charCodeAt(e); c(s.buffer, t) } else { var r = new XMLHttpRequest; r.open(t.No.method, i, !0), r.withCredentials = t.No.withCredentials, r.responseType = "arraybuffer", t.No.headers && Object.keys(t.No.headers).forEach((function(i) { r.setRequestHeader(i, t.No.headers[i]) })), r.onload = function() { var i = (r.status + "")[0]; "0" === i || "2" === i || "3" === i ? c(r.response, t) : t.vo("loaderror", null, "Failed loading audio file with status: " + r.status + ".") }, r.onerror = function() { t.Jh && (t.Eo = !0, t.Jh = !1, t._o = [], delete u[i], t.load()) }, l(r) } }, l = function(t) { try { t.send() } catch (i) { t.onerror() } }, c = function(t, i) { var n = function() { i.vo("loaderror", null, "Decoding audio data failed.") }, s = function(t) { t && i._o.length > 0 ? (u[i.Io] = t, f(i, t)) : n() }; "undefined" != typeof Promise && 1 === r.ctx.decodeAudioData.length ? r.ctx.decodeAudioData(t).then(s).catch(n) : r.ctx.decodeAudioData(t, s, n) }, f = function(t, i) { i && !t.Ro && (t.Ro = i.duration), 0 === Object.keys(t.Oo).length && (t.Oo = { __default: [0, 1e3 * t.Ro] }), "loaded" !== t.Po && (t.Po = "loaded", t.vo("load"), t.Fo()) }, v = function() { if (r.usingWebAudio) { try { "undefined" != typeof AudioContext ? r.ctx = new AudioContext : "undefined" != typeof webkitAudioContext ? r.ctx = new webkitAudioContext : r.usingWebAudio = !1 } catch (t) { r.usingWebAudio = !1 } r.ctx || (r.usingWebAudio = !1); var t = /iP(hone|od|ad)/.test(r.qh && r.qh.platform), i = r.qh && r.qh.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/), n = i ? parseInt(i[1], 10) : null; if (t && n && n < 9) { var s = /safari/.test(r.qh && r.qh.userAgent.toLowerCase()); r.qh && !s && (r.usingWebAudio = !1) } r.usingWebAudio && (r.masterGain = void 0 === r.ctx.createGain ? r.ctx.createGainNode() : r.ctx.createGain(), r.masterGain.gain.setValueAtTime(r.Yh ? 0 : r.zh, r.ctx.currentTime), r.masterGain.connect(r.ctx.destination)), r.Zh() } }; void 0 !== (s = function() { return { Howler: r, Howl: h } }.apply(i, [])) && (t.exports = s), i.Howler = r, i.Howl = h, void 0 !== n.g ? (n.g.HowlerGlobal = e, n.g.Howler = r, n.g.Howl = h, n.g.Sound = o) : "undefined" != typeof window && (window.HowlerGlobal = e, window.Howler = r, window.Howl = h, window.Sound = o) }() }, 9286: (t, i, n) => { var s = "function" == typeof Map && Map.prototype, e = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, r = s && e && "function" == typeof e.get ? e.get : null, h = s && Map.prototype.forEach, o = "function" == typeof Set && Set.prototype, u = Object.getOwnPropertyDescriptor && o ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, a = o && u && "function" == typeof u.get ? u.get : null, l = o && Set.prototype.forEach, c = "function" == typeof WeakMap && WeakMap.prototype ? WeakMap.prototype.has : null, f = "function" == typeof WeakSet && WeakSet.prototype ? WeakSet.prototype.has : null, v = "function" == typeof WeakRef && WeakRef.prototype ? WeakRef.prototype.deref : null, d = Boolean.prototype.valueOf, _ = Object.prototype.toString, p = Function.prototype.toString, m = String.prototype.match, b = String.prototype.slice, w = String.prototype.replace, g = String.prototype.toUpperCase, y = String.prototype.toLowerCase, E = RegExp.prototype.test, S = Array.prototype.concat, A = Array.prototype.join, T = Array.prototype.slice, M = Math.floor, O = "function" == typeof BigInt ? BigInt.prototype.valueOf : null, I = Object.getOwnPropertySymbols, N = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? Symbol.prototype.toString : null, R = "function" == typeof Symbol && "object" == typeof Symbol.iterator, P = "function" == typeof Symbol && Symbol.toStringTag && (typeof Symbol.toStringTag === R || "symbol") ? Symbol.toStringTag : null, x = Object.prototype.propertyIsEnumerable, L = ("function" == typeof Reflect ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) { return t.__proto__ } : null); function C(t, i) { if (t === 1 / 0 || t === -1 / 0 || t != t || t && t > -1e3 && t < 1e3 || E.call(/e/, i)) return i; var n = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; if ("number" == typeof t) { var s = t < 0 ? -M(-t) : M(t); if (s !== t) { var e = String(s), r = b.call(i, e.length + 1); return w.call(e, n, "$&_") + "." + w.call(w.call(r, /([0-9]{3})/g, "$&_"), /_$/, "") } } return w.call(i, n, "$&_") } var U = n(4654), k = U.custom, F = W(k) ? k : null; function B(t, i, n) { var s = "double" === (n.quoteStyle || i) ? '"' : "'"; return s + t + s } function D(t) { return w.call(String(t), /"/g, """) } function j(t) { return !("[object Array]" !== V(t) || P && "object" == typeof t && P in t) } function G(t) { return !("[object RegExp]" !== V(t) || P && "object" == typeof t && P in t) } function W(t) { if (R) return t && "object" == typeof t && t instanceof Symbol; if ("symbol" == typeof t) return !0; if (!t || "object" != typeof t || !N) return !1; try { return N.call(t), !0 } catch (t) {} return !1 } t.exports = function t(i, n, s, e) { var o = n || {}; if (X(o, "quoteStyle") && "single" !== o.quoteStyle && "double" !== o.quoteStyle) throw new TypeError('option "quoteStyle" must be "single" or "double"'); if (X(o, "maxStringLength") && ("number" == typeof o.maxStringLength ? o.maxStringLength < 0 && o.maxStringLength !== 1 / 0 : null !== o.maxStringLength)) throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); var u = !X(o, "customInspect") || o.customInspect; if ("boolean" != typeof u && "symbol" !== u) throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); if (X(o, "indent") && null !== o.indent && "\t" !== o.indent && !(parseInt(o.indent, 10) === o.indent && o.indent > 0)) throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); if (X(o, "numericSeparator") && "boolean" != typeof o.numericSeparator) throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); var _ = o.numericSeparator; if (void 0 === i) return "undefined"; if (null === i) return "null"; if ("boolean" == typeof i) return i ? "true" : "false"; if ("string" == typeof i) return Y(i, o); if ("number" == typeof i) { if (0 === i) return 1 / 0 / i > 0 ? "0" : "-0"; var g = String(i); return _ ? C(i, g) : g } if ("bigint" == typeof i) { var E = String(i) + "n"; return _ ? C(i, E) : E } var M = void 0 === o.depth ? 5 : o.depth; if (void 0 === s && (s = 0), s >= M && M > 0 && "object" == typeof i) return j(i) ? "[Array]" : "[Object]"; var I = function(t, i) { var n; if ("\t" === t.indent) n = "\t"; else { if (!("number" == typeof t.indent && t.indent > 0)) return null; n = A.call(Array(t.indent + 1), " ") } return { base: n, prev: A.call(Array(i + 1), n) } }(o, s); if (void 0 === e) e = []; else if ($(e, i) >= 0) return "[Circular]"; function k(i, n, r) { if (n && (e = T.call(e)).push(n), r) { var h = { depth: o.depth }; return X(o, "quoteStyle") && (h.quoteStyle = o.quoteStyle), t(i, h, s + 1, e) } return t(i, o, s + 1, e) } if ("function" == typeof i && !G(i)) { var H = function(t) { if (t.name) return t.name; var i = m.call(p.call(t), /^function\s*([\w$]+)/); if (i) return i[1]; return null }(i), z = Q(i, k); return "[Function" + (H ? ": " + H : " (anonymous)") + "]" + (z.length > 0 ? " { " + A.call(z, ", ") + " }" : "") } if (W(i)) { var tt = R ? w.call(String(i), /^(Symbol\(.*\))_[^)]*$/, "$1") : N.call(i); return "object" != typeof i || R ? tt : K(tt) } if (function(t) { if (!t || "object" != typeof t) return !1; if ("undefined" != typeof HTMLElement && t instanceof HTMLElement) return !0; return "string" == typeof t.nodeName && "function" == typeof t.getAttribute }(i)) { for (var it = "<" + y.call(String(i.nodeName)), nt = i.attributes || [], st = 0; st < nt.length; st++) it += " " + nt[st].name + "=" + B(D(nt[st].value), "double", o); return it += ">", i.childNodes && i.childNodes.length && (it += "..."), it += "" } if (j(i)) { if (0 === i.length) return "[]"; var et = Q(i, k); return I && ! function(t) { for (var i = 0; i < t.length; i++) if ($(t[i], "\n") >= 0) return !1; return !0 }(et) ? "[" + J(et, I) + "]" : "[ " + A.call(et, ", ") + " ]" } if (function(t) { return !("[object Error]" !== V(t) || P && "object" == typeof t && P in t) }(i)) { var rt = Q(i, k); return "cause" in Error.prototype || !("cause" in i) || x.call(i, "cause") ? 0 === rt.length ? "[" + String(i) + "]" : "{ [" + String(i) + "] " + A.call(rt, ", ") + " }" : "{ [" + String(i) + "] " + A.call(S.call("[cause]: " + k(i.cause), rt), ", ") + " }" } if ("object" == typeof i && u) { if (F && "function" == typeof i[F] && U) return U(i, { depth: M - s }); if ("symbol" !== u && "function" == typeof i.inspect) return i.inspect() } if (function(t) { if (!r || !t || "object" != typeof t) return !1; try { r.call(t); try { a.call(t) } catch (t) { return !0 } return t instanceof Map } catch (t) {} return !1 }(i)) { var ht = []; return h && h.call(i, (function(t, n) { ht.push(k(n, i, !0) + " => " + k(t, i)) })), Z("Map", r.call(i), ht, I) } if (function(t) { if (!a || !t || "object" != typeof t) return !1; try { a.call(t); try { r.call(t) } catch (t) { return !0 } return t instanceof Set } catch (t) {} return !1 }(i)) { var ot = []; return l && l.call(i, (function(t) { ot.push(k(t, i)) })), Z("Set", a.call(i), ot, I) } if (function(t) { if (!c || !t || "object" != typeof t) return !1; try { c.call(t, c); try { f.call(t, f) } catch (t) { return !0 } return t instanceof WeakMap } catch (t) {} return !1 }(i)) return q("WeakMap"); if (function(t) { if (!f || !t || "object" != typeof t) return !1; try { f.call(t, f); try { c.call(t, c) } catch (t) { return !0 } return t instanceof WeakSet } catch (t) {} return !1 }(i)) return q("WeakSet"); if (function(t) { if (!v || !t || "object" != typeof t) return !1; try { return v.call(t), !0 } catch (t) {} return !1 }(i)) return q("WeakRef"); if (function(t) { return !("[object Number]" !== V(t) || P && "object" == typeof t && P in t) }(i)) return K(k(Number(i))); if (function(t) { if (!t || "object" != typeof t || !O) return !1; try { return O.call(t), !0 } catch (t) {} return !1 }(i)) return K(k(O.call(i))); if (function(t) { return !("[object Boolean]" !== V(t) || P && "object" == typeof t && P in t) }(i)) return K(d.call(i)); if (function(t) { return !("[object String]" !== V(t) || P && "object" == typeof t && P in t) }(i)) return K(k(String(i))); if (! function(t) { return !("[object Date]" !== V(t) || P && "object" == typeof t && P in t) }(i) && !G(i)) { var ut = Q(i, k), at = L ? L(i) === Object.prototype : i instanceof Object || i.constructor === Object, lt = i instanceof Object ? "" : "null prototype", ct = !at && P && Object(i) === i && P in i ? b.call(V(i), 8, -1) : lt ? "Object" : "", ft = (at || "function" != typeof i.constructor ? "" : i.constructor.name ? i.constructor.name + " " : "") + (ct || lt ? "[" + A.call(S.call([], ct || [], lt || []), ": ") + "] " : ""); return 0 === ut.length ? ft + "{}" : I ? ft + "{" + J(ut, I) + "}" : ft + "{ " + A.call(ut, ", ") + " }" } return String(i) }; var H = Object.prototype.hasOwnProperty || function(t) { return t in this }; function X(t, i) { return H.call(t, i) } function V(t) { return _.call(t) } function $(t, i) { if (t.indexOf) return t.indexOf(i); for (var n = 0, s = t.length; n < s; n++) if (t[n] === i) return n; return -1 } function Y(t, i) { if (t.length > i.maxStringLength) { var n = t.length - i.maxStringLength, s = "... " + n + " more character" + (n > 1 ? "s" : ""); return Y(b.call(t, 0, i.maxStringLength), i) + s } return B(w.call(w.call(t, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, z), "single", i) } function z(t) { var i = t.charCodeAt(0), n = { 8: "b", 9: "t", 10: "n", 12: "f", 13: "r" } [i]; return n ? "\\" + n : "\\x" + (i < 16 ? "0" : "") + g.call(i.toString(16)) } function K(t) { return "Object(" + t + ")" } function q(t) { return t + " { ? }" } function Z(t, i, n, s) { return t + " (" + i + ") {" + (s ? J(n, s) : A.call(n, ", ")) + "}" } function J(t, i) { if (0 === t.length) return ""; var n = "\n" + i.prev + i.base; return n + A.call(t, "," + n) + "\n" + i.prev } function Q(t, i) { var n = j(t), s = []; if (n) { s.length = t.length; for (var e = 0; e < t.length; e++) s[e] = X(t, e) ? i(t[e], t) : "" } var r, h = "function" == typeof I ? I(t) : []; if (R) { r = {}; for (var o = 0; o < h.length; o++) r["$" + h[o]] = h[o] } for (var u in t) X(t, u) && (n && String(Number(u)) === u && u < t.length || R && r["$" + u] instanceof Symbol || (E.call(/[^\w$]/, u) ? s.push(i(u, t) + ": " + i(t[u], t)) : s.push(u + ": " + i(t[u], t)))); if ("function" == typeof I) for (var a = 0; a < h.length; a++) x.call(t, h[a]) && s.push("[" + i(h[a]) + "]: " + i(t[h[a]], t)); return s } }, 2709: (t, i, n) => { "use strict"; var s = n(3362), e = n(9588), r = n(9286), h = s("%TypeError%"), o = s("%WeakMap%", !0), u = s("%Map%", !0), a = e("WeakMap.prototype.get", !0), l = e("WeakMap.prototype.set", !0), c = e("WeakMap.prototype.has", !0), f = e("Map.prototype.get", !0), v = e("Map.prototype.set", !0), d = e("Map.prototype.has", !0), _ = function(t, i) { for (var n, s = t; null !== (n = s.next); s = n) if (n.key === i) return s.next = n.next, n.next = t.next, t.next = n, n }; t.exports = function() { var t, i, n, s = { assert: function(t) { if (!s.has(t)) throw new h("Side channel does not contain " + r(t)) }, get: function(s) { if (o && s && ("object" == typeof s || "function" == typeof s)) { if (t) return a(t, s) } else if (u) { if (i) return f(i, s) } else if (n) return function(t, i) { var n = _(t, i); return n && n.value }(n, s) }, has: function(s) { if (o && s && ("object" == typeof s || "function" == typeof s)) { if (t) return c(t, s) } else if (u) { if (i) return d(i, s) } else if (n) return function(t, i) { return !!_(t, i) }(n, s); return !1 }, set: function(s, e) { o && s && ("object" == typeof s || "function" == typeof s) ? (t || (t = new o), l(t, s, e)) : u ? (i || (i = new u), v(i, s, e)) : (n || (n = { key: {}, next: null }), function(t, i, n) { var s = _(t, i); s ? s.value = n : t.next = { key: i, next: t.next, value: n } }(n, s, e)) } }; return s } }, 7648: function(t, i, n) { var s; /*! https://mths.be/punycode v1.4.1 by @mathias */ t = n.nmd(t), function(e) { var r = "object" == typeof n.g && n.g; var h, o = 2147483647, u = 36, a = 1, l = 26, c = 38, f = 700, v = 72, d = 128, _ = "-", p = /^xn--/, m = /[^\x20-\x7E]/, b = /[\x2E\u3002\uFF0E\uFF61]/g, w = { overflow: "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }, g = u - a, y = Math.floor, E = String.fromCharCode; function S(t) { throw new RangeError(w[t]) } function A(t, i) { for (var n = t.length, s = []; n--;) s[n] = i(t[n]); return s } function T(t, i) { var n = t.split("@"), s = ""; return n.length > 1 && (s = n[0] + "@", t = n[1]), s + A((t = t.replace(b, ".")).split("."), i).join(".") } function M(t) { for (var i, n, s = [], e = 0, r = t.length; e < r;)(i = t.charCodeAt(e++)) >= 55296 && i <= 56319 && e < r ? 56320 == (64512 & (n = t.charCodeAt(e++))) ? s.push(((1023 & i) << 10) + (1023 & n) + 65536) : (s.push(i), e--) : s.push(i); return s } function O(t) { return A(t, (function(t) { var i = ""; return t > 65535 && (i += E((t -= 65536) >>> 10 & 1023 | 55296), t = 56320 | 1023 & t), i += E(t) })).join("") } function I(t, i) { return t + 22 + 75 * (t < 26) - ((0 != i) << 5) } function N(t, i, n) { var s = 0; for (t = n ? y(t / f) : t >> 1, t += y(t / i); t > g * l >> 1; s += u) t = y(t / g); return y(s + (g + 1) * t / (t + c)) } function R(t) { var i, n, s, e, r, h, c, f, p, m, b, w = [], g = t.length, E = 0, A = d, T = v; for ((n = t.lastIndexOf(_)) < 0 && (n = 0), s = 0; s < n; ++s) t.charCodeAt(s) >= 128 && S("not-basic"), w.push(t.charCodeAt(s)); for (e = n > 0 ? n + 1 : 0; e < g;) { for (r = E, h = 1, c = u; e >= g && S("invalid-input"), ((f = (b = t.charCodeAt(e++)) - 48 < 10 ? b - 22 : b - 65 < 26 ? b - 65 : b - 97 < 26 ? b - 97 : u) >= u || f > y((o - E) / h)) && S("overflow"), E += f * h, !(f < (p = c <= T ? a : c >= T + l ? l : c - T)); c += u) h > y(o / (m = u - p)) && S("overflow"), h *= m; T = N(E - r, i = w.length + 1, 0 == r), y(E / i) > o - A && S("overflow"), A += y(E / i), E %= i, w.splice(E++, 0, A) } return O(w) } function P(t) { var i, n, s, e, r, h, c, f, p, m, b, w, g, A, T, O = []; for (w = (t = M(t)).length, i = d, n = 0, r = v, h = 0; h < w; ++h)(b = t[h]) < 128 && O.push(E(b)); for (s = e = O.length, e && O.push(_); s < w;) { for (c = o, h = 0; h < w; ++h)(b = t[h]) >= i && b < c && (c = b); for (c - i > y((o - n) / (g = s + 1)) && S("overflow"), n += (c - i) * g, i = c, h = 0; h < w; ++h) if ((b = t[h]) < i && ++n > o && S("overflow"), b == i) { for (f = n, p = u; !(f < (m = p <= r ? a : p >= r + l ? l : p - r)); p += u) O.push(E(I(m + (T = f - m) % (A = u - m), 0))), f = y(T / A); O.push(E(I(f, 0))), r = N(n, g, s == e), n = 0, ++s }++ n, ++i } return O.join("") } h = { version: "1.4.1", ucs2: { decode: M, encode: O }, decode: R, encode: P, toASCII: function(t) { return T(t, (function(t) { return m.test(t) ? "xn--" + P(t) : t })) }, toUnicode: function(t) { return T(t, (function(t) { return p.test(t) ? R(t.slice(4).toLowerCase()) : t })) } }, void 0 === (s = function() { return h }.call(i, n, i, t)) || (t.exports = s) }() }, 3370: t => { "use strict"; var i = String.prototype.replace, n = /%20/g, s = "RFC3986"; t.exports = { default: s, formatters: { RFC1738: function(t) { return i.call(t, n, "+") }, RFC3986: function(t) { return String(t) } }, RFC1738: "RFC1738", RFC3986: s } }, 3103: (t, i, n) => { "use strict"; var s = n(7576), e = n(7471), r = n(3370); t.exports = { formats: r, parse: e, stringify: s } }, 7471: (t, i, n) => { "use strict"; var s = n(6259), e = Object.prototype.hasOwnProperty, r = Array.isArray, h = { allowDots: !1, allowPrototypes: !1, allowSparse: !1, arrayLimit: 20, charset: "utf-8", charsetSentinel: !1, comma: !1, decoder: s.decode, delimiter: "&", depth: 5, ignoreQueryPrefix: !1, interpretNumericEntities: !1, parameterLimit: 1e3, parseArrays: !0, plainObjects: !1, strictNullHandling: !1 }, o = function(t) { return t.replace(/&#(\d+);/g, (function(t, i) { return String.fromCharCode(parseInt(i, 10)) })) }, u = function(t, i) { return t && "string" == typeof t && i.comma && t.indexOf(",") > -1 ? t.split(",") : t }, a = function(t, i, n, s) { if (t) { var r = n.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, h = /(\[[^[\]]*])/g, o = n.depth > 0 && /(\[[^[\]]*])/.exec(r), a = o ? r.slice(0, o.index) : r, l = []; if (a) { if (!n.plainObjects && e.call(Object.prototype, a) && !n.allowPrototypes) return; l.push(a) } for (var c = 0; n.depth > 0 && null !== (o = h.exec(r)) && c < n.depth;) { if (c += 1, !n.plainObjects && e.call(Object.prototype, o[1].slice(1, -1)) && !n.allowPrototypes) return; l.push(o[1]) } return o && l.push("[" + r.slice(o.index) + "]"), function(t, i, n, s) { for (var e = s ? i : u(i, n), r = t.length - 1; r >= 0; --r) { var h, o = t[r]; if ("[]" === o && n.parseArrays) h = [].concat(e); else { h = n.plainObjects ? Object.create(null) : {}; var a = "[" === o.charAt(0) && "]" === o.charAt(o.length - 1) ? o.slice(1, -1) : o, l = parseInt(a, 10); n.parseArrays || "" !== a ? !isNaN(l) && o !== a && String(l) === a && l >= 0 && n.parseArrays && l <= n.arrayLimit ? (h = [])[l] = e : "__proto__" !== a && (h[a] = e) : h = { 0: e } } e = h } return e }(l, i, n, s) } }; t.exports = function(t, i) { var n = function(t) { if (!t) return h; if (null != t.decoder && "function" != typeof t.decoder) throw new TypeError("Decoder has to be a function."); if (void 0 !== t.charset && "utf-8" !== t.charset && "iso-8859-1" !== t.charset) throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); return { allowDots: void 0 === t.allowDots ? h.allowDots : !!t.allowDots, allowPrototypes: "boolean" == typeof t.allowPrototypes ? t.allowPrototypes : h.allowPrototypes, allowSparse: "boolean" == typeof t.allowSparse ? t.allowSparse : h.allowSparse, arrayLimit: "number" == typeof t.arrayLimit ? t.arrayLimit : h.arrayLimit, charset: void 0 === t.charset ? h.charset : t.charset, charsetSentinel: "boolean" == typeof t.charsetSentinel ? t.charsetSentinel : h.charsetSentinel, comma: "boolean" == typeof t.comma ? t.comma : h.comma, decoder: "function" == typeof t.decoder ? t.decoder : h.decoder, delimiter: "string" == typeof t.delimiter || s.isRegExp(t.delimiter) ? t.delimiter : h.delimiter, depth: "number" == typeof t.depth || !1 === t.depth ? +t.depth : h.depth, ignoreQueryPrefix: !0 === t.ignoreQueryPrefix, interpretNumericEntities: "boolean" == typeof t.interpretNumericEntities ? t.interpretNumericEntities : h.interpretNumericEntities, parameterLimit: "number" == typeof t.parameterLimit ? t.parameterLimit : h.parameterLimit, parseArrays: !1 !== t.parseArrays, plainObjects: "boolean" == typeof t.plainObjects ? t.plainObjects : h.plainObjects, strictNullHandling: "boolean" == typeof t.strictNullHandling ? t.strictNullHandling : h.strictNullHandling } }(i); if ("" === t || null == t) return n.plainObjects ? Object.create(null) : {}; for (var l = "string" == typeof t ? function(t, i) { var n, a = { __proto__: null }, l = (i.ignoreQueryPrefix ? t.replace(/^\?/, "") : t).split(i.delimiter, i.parameterLimit === 1 / 0 ? void 0 : i.parameterLimit), c = -1, f = i.charset; if (i.charsetSentinel) for (n = 0; n < l.length; ++n) 0 === l[n].indexOf("utf8=") && ("utf8=%E2%9C%93" === l[n] ? f = "utf-8" : "utf8=%26%2310003%3B" === l[n] && (f = "iso-8859-1"), c = n, n = l.length); for (n = 0; n < l.length; ++n) if (n !== c) { var v, d, _ = l[n], p = _.indexOf("]="), m = -1 === p ? _.indexOf("=") : p + 1; - 1 === m ? (v = i.decoder(_, h.decoder, f, "key"), d = i.strictNullHandling ? null : "") : (v = i.decoder(_.slice(0, m), h.decoder, f, "key"), d = s.maybeMap(u(_.slice(m + 1), i), (function(t) { return i.decoder(t, h.decoder, f, "value") }))), d && i.interpretNumericEntities && "iso-8859-1" === f && (d = o(d)), _.indexOf("[]=") > -1 && (d = r(d) ? [d] : d), a[v] = e.call(a, v) ? s.combine(a[v], d) : d } return a }(t, n) : t, c = n.plainObjects ? Object.create(null) : {}, f = Object.keys(l), v = 0; v < f.length; ++v) { var d = f[v], _ = a(d, l[d], n, "string" == typeof t); c = s.merge(c, _, n) } return !0 === n.allowSparse ? c : s.compact(c) } }, 7576: (t, i, n) => { "use strict"; var s = n(2709), e = n(6259), r = n(3370), h = Object.prototype.hasOwnProperty, o = { brackets: function(t) { return t + "[]" }, comma: "comma", indices: function(t, i) { return t + "[" + i + "]" }, repeat: function(t) { return t } }, u = Array.isArray, a = Array.prototype.push, l = function(t, i) { a.apply(t, u(i) ? i : [i]) }, c = Date.prototype.toISOString, f = r.default, v = { addQueryPrefix: !1, allowDots: !1, charset: "utf-8", charsetSentinel: !1, delimiter: "&", encode: !0, encoder: e.encode, encodeValuesOnly: !1, format: f, formatter: r.formatters[f], indices: !1, serializeDate: function(t) { return c.call(t) }, skipNulls: !1, strictNullHandling: !1 }, d = {}, _ = function t(i, n, r, h, o, a, c, f, _, p, m, b, w, g, y, E) { for (var S, A = i, T = E, M = 0, O = !1; void 0 !== (T = T.get(d)) && !O;) { var I = T.get(i); if (M += 1, void 0 !== I) { if (I === M) throw new RangeError("Cyclic object value"); O = !0 } void 0 === T.get(d) && (M = 0) } if ("function" == typeof f ? A = f(n, A) : A instanceof Date ? A = m(A) : "comma" === r && u(A) && (A = e.maybeMap(A, (function(t) { return t instanceof Date ? m(t) : t }))), null === A) { if (o) return c && !g ? c(n, v.encoder, y, "key", b) : n; A = "" } if ("string" == typeof(S = A) || "number" == typeof S || "boolean" == typeof S || "symbol" == typeof S || "bigint" == typeof S || e.isBuffer(A)) return c ? [w(g ? n : c(n, v.encoder, y, "key", b)) + "=" + w(c(A, v.encoder, y, "value", b))] : [w(n) + "=" + w(String(A))]; var N, R = []; if (void 0 === A) return R; if ("comma" === r && u(A)) g && c && (A = e.maybeMap(A, c)), N = [{ value: A.length > 0 ? A.join(",") || null : void 0 }]; else if (u(f)) N = f; else { var P = Object.keys(A); N = _ ? P.sort(_) : P } for (var x = h && u(A) && 1 === A.length ? n + "[]" : n, L = 0; L < N.length; ++L) { var C = N[L], U = "object" == typeof C && void 0 !== C.value ? C.value : A[C]; if (!a || null !== U) { var k = u(A) ? "function" == typeof r ? r(x, C) : x : x + (p ? "." + C : "[" + C + "]"); E.set(i, M); var F = s(); F.set(d, E), l(R, t(U, k, r, h, o, a, "comma" === r && g && u(A) ? null : c, f, _, p, m, b, w, g, y, F)) } } return R }; t.exports = function(t, i) { var n, e = t, a = function(t) { if (!t) return v; if (null != t.encoder && "function" != typeof t.encoder) throw new TypeError("Encoder has to be a function."); var i = t.charset || v.charset; if (void 0 !== t.charset && "utf-8" !== t.charset && "iso-8859-1" !== t.charset) throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); var n = r.default; if (void 0 !== t.format) { if (!h.call(r.formatters, t.format)) throw new TypeError("Unknown format option provided."); n = t.format } var s = r.formatters[n], e = v.filter; return ("function" == typeof t.filter || u(t.filter)) && (e = t.filter), { addQueryPrefix: "boolean" == typeof t.addQueryPrefix ? t.addQueryPrefix : v.addQueryPrefix, allowDots: void 0 === t.allowDots ? v.allowDots : !!t.allowDots, charset: i, charsetSentinel: "boolean" == typeof t.charsetSentinel ? t.charsetSentinel : v.charsetSentinel, delimiter: void 0 === t.delimiter ? v.delimiter : t.delimiter, encode: "boolean" == typeof t.encode ? t.encode : v.encode, encoder: "function" == typeof t.encoder ? t.encoder : v.encoder, encodeValuesOnly: "boolean" == typeof t.encodeValuesOnly ? t.encodeValuesOnly : v.encodeValuesOnly, filter: e, format: n, formatter: s, serializeDate: "function" == typeof t.serializeDate ? t.serializeDate : v.serializeDate, skipNulls: "boolean" == typeof t.skipNulls ? t.skipNulls : v.skipNulls, sort: "function" == typeof t.sort ? t.sort : null, strictNullHandling: "boolean" == typeof t.strictNullHandling ? t.strictNullHandling : v.strictNullHandling } }(i); "function" == typeof a.filter ? e = (0, a.filter)("", e) : u(a.filter) && (n = a.filter); var c = []; if ("object" != typeof e || null === e) return ""; var f = o[i && i.arrayFormat in o ? i.arrayFormat : i && "indices" in i ? i.indices ? "indices" : "repeat" : "indices"]; if (i && "commaRoundTrip" in i && "boolean" != typeof i.commaRoundTrip) throw new TypeError("`commaRoundTrip` must be a boolean, or absent"); var d = "comma" === f && i && i.commaRoundTrip; n || (n = Object.keys(e)), a.sort && n.sort(a.sort); for (var p = s(), m = 0; m < n.length; ++m) { var b = n[m]; a.skipNulls && null === e[b] || l(c, _(e[b], b, f, d, a.strictNullHandling, a.skipNulls, a.encode ? a.encoder : null, a.filter, a.sort, a.allowDots, a.serializeDate, a.format, a.formatter, a.encodeValuesOnly, a.charset, p)) } var w = c.join(a.delimiter), g = !0 === a.addQueryPrefix ? "?" : ""; return a.charsetSentinel && (g += "iso-8859-1" === a.charset ? "utf8=%26%2310003%3B&" : "utf8=%E2%9C%93&"), w.length > 0 ? g + w : "" } }, 6259: (t, i, n) => { "use strict"; var s = n(3370), e = Object.prototype.hasOwnProperty, r = Array.isArray, h = function() { for (var t = [], i = 0; i < 256; ++i) t.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase()); return t }(), o = function(t, i) { for (var n = i && i.plainObjects ? Object.create(null) : {}, s = 0; s < t.length; ++s) void 0 !== t[s] && (n[s] = t[s]); return n }; t.exports = { arrayToObject: o, assign: function(t, i) { return Object.keys(i).reduce((function(t, n) { return t[n] = i[n], t }), t) }, combine: function(t, i) { return [].concat(t, i) }, compact: function(t) { for (var i = [{ obj: { o: t }, prop: "o" }], n = [], s = 0; s < i.length; ++s) for (var e = i[s], h = e.obj[e.prop], o = Object.keys(h), u = 0; u < o.length; ++u) { var a = o[u], l = h[a]; "object" == typeof l && null !== l && -1 === n.indexOf(l) && (i.push({ obj: h, prop: a }), n.push(l)) } return function(t) { for (; t.length > 1;) { var i = t.pop(), n = i.obj[i.prop]; if (r(n)) { for (var s = [], e = 0; e < n.length; ++e) void 0 !== n[e] && s.push(n[e]); i.obj[i.prop] = s } } }(i), t }, decode: function(t, i, n) { var s = t.replace(/\+/g, " "); if ("iso-8859-1" === n) return s.replace(/%[0-9a-f]{2}/gi, unescape); try { return decodeURIComponent(s) } catch (t) { return s } }, encode: function(t, i, n, e, r) { if (0 === t.length) return t; var o = t; if ("symbol" == typeof t ? o = Symbol.prototype.toString.call(t) : "string" != typeof t && (o = String(t)), "iso-8859-1" === n) return escape(o).replace(/%u[0-9a-f]{4}/gi, (function(t) { return "%26%23" + parseInt(t.slice(2), 16) + "%3B" })); for (var u = "", a = 0; a < o.length; ++a) { var l = o.charCodeAt(a); 45 === l || 46 === l || 95 === l || 126 === l || l >= 48 && l <= 57 || l >= 65 && l <= 90 || l >= 97 && l <= 122 || r === s.RFC1738 && (40 === l || 41 === l) ? u += o.charAt(a) : l < 128 ? u += h[l] : l < 2048 ? u += h[192 | l >> 6] + h[128 | 63 & l] : l < 55296 || l >= 57344 ? u += h[224 | l >> 12] + h[128 | l >> 6 & 63] + h[128 | 63 & l] : (l = 65536 + ((1023 & l) << 10 | 1023 & o.charCodeAt(a += 1)), u += h[240 | l >> 18] + h[128 | l >> 12 & 63] + h[128 | l >> 6 & 63] + h[128 | 63 & l]) } return u }, isBuffer: function(t) { return !(!t || "object" != typeof t) && !!(t.constructor && t.constructor.isBuffer && t.constructor.isBuffer(t)) }, isRegExp: function(t) { return "[object RegExp]" === Object.prototype.toString.call(t) }, maybeMap: function(t, i) { if (r(t)) { for (var n = [], s = 0; s < t.length; s += 1) n.push(i(t[s])); return n } return i(t) }, merge: function t(i, n, s) { if (!n) return i; if ("object" != typeof n) { if (r(i)) i.push(n); else { if (!i || "object" != typeof i) return [i, n]; (s && (s.plainObjects || s.allowPrototypes) || !e.call(Object.prototype, n)) && (i[n] = !0) } return i } if (!i || "object" != typeof i) return [i].concat(n); var h = i; return r(i) && !r(n) && (h = o(i, s)), r(i) && r(n) ? (n.forEach((function(n, r) { if (e.call(i, r)) { var h = i[r]; h && "object" == typeof h && n && "object" == typeof n ? i[r] = t(h, n, s) : i.push(n) } else i[r] = n })), i) : Object.keys(n).reduce((function(i, r) { var h = n[r]; return i[r] = e.call(i, r) ? t(i[r], h, s) : h, i }), h) } } }, 9830: (t, i, n) => { "use strict"; var s = n(7648); function e() { this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null } var r = /^([a-z0-9.+-]+:)/i, h = /:[0-9]*$/, o = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, u = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", "\t"]), a = ["'"].concat(u), l = ["%", "/", "?", ";", "#"].concat(a), c = ["/", "?", "#"], f = /^[+a-z0-9A-Z_-]{0,63}$/, v = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, d = { javascript: !0, "javascript:": !0 }, _ = { javascript: !0, "javascript:": !0 }, p = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, m = n(3103); function b(t, i, n) { if (t && "object" == typeof t && t instanceof e) return t; var s = new e; return s.parse(t, i, n), s } e.prototype.parse = function(t, i, n) { if ("string" != typeof t) throw new TypeError("Parameter 'url' must be a string, not " + typeof t); var e = t.indexOf("?"), h = -1 !== e && e < t.indexOf("#") ? "?" : "#", u = t.split(h); u[0] = u[0].replace(/\\/g, "/"); var b = t = u.join(h); if (b = b.trim(), !n && 1 === t.split("#").length) { var w = o.exec(b); if (w) return this.path = b, this.href = b, this.pathname = w[1], w[2] ? (this.search = w[2], this.query = i ? m.parse(this.search.substr(1)) : this.search.substr(1)) : i && (this.search = "", this.query = {}), this } var g = r.exec(b); if (g) { var y = (g = g[0]).toLowerCase(); this.protocol = y, b = b.substr(g.length) } if (n || g || b.match(/^\/\/[^@/]+@[^@/]+/)) { var E = "//" === b.substr(0, 2); !E || g && _[g] || (b = b.substr(2), this.slashes = !0) } if (!_[g] && (E || g && !p[g])) { for (var S, A, T = -1, M = 0; M < c.length; M++) { -1 !== (O = b.indexOf(c[M])) && (-1 === T || O < T) && (T = O) } - 1 !== (A = -1 === T ? b.lastIndexOf("@") : b.lastIndexOf("@", T)) && (S = b.slice(0, A), b = b.slice(A + 1), this.auth = decodeURIComponent(S)), T = -1; for (M = 0; M < l.length; M++) { var O; - 1 !== (O = b.indexOf(l[M])) && (-1 === T || O < T) && (T = O) } - 1 === T && (T = b.length), this.host = b.slice(0, T), b = b.slice(T), this.parseHost(), this.hostname = this.hostname || ""; var I = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1]; if (!I) for (var N = this.hostname.split(/\./), R = (M = 0, N.length); M < R; M++) { var P = N[M]; if (P && !P.match(f)) { for (var x = "", L = 0, C = P.length; L < C; L++) P.charCodeAt(L) > 127 ? x += "x" : x += P[L]; if (!x.match(f)) { var U = N.slice(0, M), k = N.slice(M + 1), F = P.match(v); F && (U.push(F[1]), k.unshift(F[2])), k.length && (b = "/" + k.join(".") + b), this.hostname = U.join("."); break } } } this.hostname = this.hostname.length > 255 ? "" : this.hostname.toLowerCase(), I || (this.hostname = s.toASCII(this.hostname)), this.host = (this.hostname || "") + (this.port ? ":" + this.port : ""), this.href += this.host, I && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), "/" !== b[0] && (b = "/" + b)) } if (!d[y]) for (M = 0, R = a.length; M < R; M++) { var B = a[M]; if (-1 !== b.indexOf(B)) { var D = encodeURIComponent(B); D === B && (D = escape(B)), b = b.split(B).join(D) } } var j = b.indexOf("#"); - 1 !== j && (this.hash = b.substr(j), b = b.slice(0, j)); var G = b.indexOf("?"); (-1 !== G ? (this.search = b.substr(G), this.query = b.substr(G + 1), i && (this.query = m.parse(this.query)), b = b.slice(0, G)) : i && (this.search = "", this.query = {}), b && (this.pathname = b), p[y] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) && (this.path = (this.pathname || "") + (this.search || "")); return this.href = this.format(), this }, e.prototype.format = function() { var t = this.auth || ""; t && (t = (t = encodeURIComponent(t)).replace(/%3A/i, ":"), t += "@"); var i = this.protocol || "", n = this.pathname || "", s = this.hash || "", e = !1, r = ""; this.host ? e = t + this.host : this.hostname && (e = t + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port && (e += ":" + this.port)), this.query && "object" == typeof this.query && Object.keys(this.query).length && (r = m.stringify(this.query)); var h = this.search || r && "?" + r || ""; return i && ":" !== i.substr(-1) && (i += ":"), this.slashes || (!i || p[i]) && !1 !== e ? (e = "//" + (e || ""), n && "/" !== n.charAt(0) && (n = "/" + n)) : e || (e = ""), s && "#" !== s.charAt(0) && (s = "#" + s), h && "?" !== h.charAt(0) && (h = "?" + h), i + e + (n = n.replace(/[?#]/g, (function(t) { return encodeURIComponent(t) }))) + (h = h.replace("#", "%23")) + s }, e.prototype.resolve = function(t) { return this.resolveObject(b(t, !1, !0)).format() }, e.prototype.resolveObject = function(t) { if ("string" == typeof t) { var i = new e; i.parse(t, !1, !0), t = i } for (var n = new e, s = Object.keys(this), r = 0; r < s.length; r++) { var h = s[r]; n[h] = this[h] } if (n.hash = t.hash, "" === t.href) return n.href = n.format(), n; if (t.slashes && !t.protocol) { for (var o = Object.keys(t), u = 0; u < o.length; u++) { var a = o[u]; "protocol" !== a && (n[a] = t[a]) } return p[n.protocol] && n.hostname && !n.pathname && (n.pathname = "/", n.path = n.pathname), n.href = n.format(), n } if (t.protocol && t.protocol !== n.protocol) { if (!p[t.protocol]) { for (var l = Object.keys(t), c = 0; c < l.length; c++) { var f = l[c]; n[f] = t[f] } return n.href = n.format(), n } if (n.protocol = t.protocol, t.host || _[t.protocol]) n.pathname = t.pathname; else { for (var v = (t.pathname || "").split("/"); v.length && !(t.host = v.shift());); t.host || (t.host = ""), t.hostname || (t.hostname = ""), "" !== v[0] && v.unshift(""), v.length < 2 && v.unshift(""), n.pathname = v.join("/") } if (n.search = t.search, n.query = t.query, n.host = t.host || "", n.auth = t.auth, n.hostname = t.hostname || t.host, n.port = t.port, n.pathname || n.search) n.path = (n.pathname || "") + (n.search || ""); return n.slashes = n.slashes || t.slashes, n.href = n.format(), n } var d = n.pathname && "/" === n.pathname.charAt(0), m = t.host || t.pathname && "/" === t.pathname.charAt(0), b = m || d || n.host && t.pathname, w = b, g = n.pathname && n.pathname.split("/") || [], y = (v = t.pathname && t.pathname.split("/") || [], n.protocol && !p[n.protocol]); if (y && (n.hostname = "", n.port = null, n.host && ("" === g[0] ? g[0] = n.host : g.unshift(n.host)), n.host = "", t.protocol && (t.hostname = null, t.port = null, t.host && ("" === v[0] ? v[0] = t.host : v.unshift(t.host)), t.host = null), b = b && ("" === v[0] || "" === g[0])), m) n.host = t.host || "" === t.host ? t.host : n.host, n.hostname = t.hostname || "" === t.hostname ? t.hostname : n.hostname, n.search = t.search, n.query = t.query, g = v; else if (v.length) g || (g = []), g.pop(), g = g.concat(v), n.search = t.search, n.query = t.query; else if (null != t.search) { if (y) n.host = g.shift(), n.hostname = n.host, (M = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth = M.shift(), n.hostname = M.shift(), n.host = n.hostname); return n.search = t.search, n.query = t.query, null === n.pathname && null === n.search || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.href = n.format(), n } if (!g.length) return n.pathname = null, n.path = n.search ? "/" + n.search : null, n.href = n.format(), n; for (var E = g.slice(-1)[0], S = (n.host || t.host || g.length > 1) && ("." === E || ".." === E) || "" === E, A = 0, T = g.length; T >= 0; T--) "." === (E = g[T]) ? g.splice(T, 1) : ".." === E ? (g.splice(T, 1), A++) : A && (g.splice(T, 1), A--); if (!b && !w) for (; A--; A) g.unshift(".."); !b || "" === g[0] || g[0] && "/" === g[0].charAt(0) || g.unshift(""), S && "/" !== g.join("/").substr(-1) && g.push(""); var M, O = "" === g[0] || g[0] && "/" === g[0].charAt(0); y && (n.hostname = O ? "" : g.length ? g.shift() : "", n.host = n.hostname, (M = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth = M.shift(), n.hostname = M.shift(), n.host = n.hostname)); return (b = b || n.host && g.length) && !O && g.unshift(""), g.length > 0 ? n.pathname = g.join("/") : (n.pathname = null, n.path = null), null === n.pathname && null === n.search || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.auth = t.auth || n.auth, n.slashes = n.slashes || t.slashes, n.href = n.format(), n }, e.prototype.parseHost = function() { var t = this.host, i = h.exec(t); i && (":" !== (i = i[0]) && (this.port = i.substr(1)), t = t.substr(0, t.length - i.length)), t && (this.hostname = t) }, i.Qc = b, i.DB = function(t, i) { return b(t, !1, !0).resolve(i) }, i.WU = function(t) { return "string" == typeof t && (t = b(t)), t instanceof e ? t.format() : e.prototype.format.call(t) } }, 204: (t, i, n) => { "use strict"; n.d(i, { AppConfig: () => dt, AppState: () => St, AutoAlignContainer: () => nt, AutoUpdateContainer: () => et, ConfigManager: () => tt, Fix: () => At, GameSceneBase: () => at, LoaderHelper: () => W, LoadingSceneBase: () => lt, Localization: () => o, MainApp: () => D, MaskType: () => vt, MultiResolutionHandler: () => pt, ResourceAsyncLoader: () => Y, ResourceManager: () => V, ResponseFormat: () => ft, SceneManager: () => ht, SlotType: () => ct, SoundManagerBase: () => Et, SymbolSpinePoolMgr: () => q }); var s, e, r = n(4665); (e = s || (s = {})).English = "en_US", e.Chinese = "zh_CN", e.Indonase = "id_ID", e.Thai = "th_TH", e.Vietnamese = "vi_VN", e.Japan = "ja_JP", e.Korea = "ko_KR", e.Indian = "hi_IN", e.Swedish = "sv_SE", e.Taiwan = "zh_TW", e.Bulgarian = "bn_BD", e.Danish = "de_DE", e.Espanhol = "es_ES", e.Finnish = "fil_PH", e.Khmer = "kh_KM", e.Portuguese = "pt_PT", e.Myanmar = "my_MM"; const h = class { static loadLanguage(t) { this.hu = V.isResourceLoaded(t) ? V.getJsonData(t) : V.getJsonData(h.ou) } static isValid(t) { return -1 !== Object.values(s).indexOf(t) && (this.uu = t, !0) } static getText(t, ...i) { let n = this.hu[t]; if (!n || 0 === n.length) return "NaN"; if (i.length) for (let t = 0; t < i.length; t++) n = n.replace("%param%", String(i[t])); return n } static getTextByCategory(t, i) { return "NaN" } static getDefaultLanguage() { return this.ou } static getCurrentLanguage() { return this.uu || this.ou } }; let o = h; o.hu = null, o.ou = s.English, o.uu = null; n(4936), n(229), n(4433); var u = n(3930), a = n(8759), l = n(6335), c = n(6480), f = n(4577), v = (n(4062), n(6002), n(1735)), d = (n(5849), n(5700)), _ = n(2877), p = (n(3767), n(5868), n(4258)), m = (n(4431), n(6359)), b = (n(8971), n(5273), n(941)), w = n(80); /*! * @pixi/prepare - v6.3.2 * Compiled Wed, 04 May 2022 17:49:13 UTC * * @pixi/prepare is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ u.X.UPLOADS_PER_FRAME = 4; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var g = function(t, i) { return (g = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]) })(t, i) }; var y = function() { function t(t) { this.maxItemsPerFrame = t, this.itemsLeft = 0 } return t.prototype.beginFrame = function() { this.itemsLeft = this.maxItemsPerFrame }, t.prototype.allowedToUpload = function() { return this.itemsLeft-- > 0 }, t }(); function E(t, i) { var n = !1; if (t && t.au && t.au.length) for (var s = 0; s < t.au.length; s++) if (t.au[s] instanceof f.xE) { var e = t.au[s].baseTexture; - 1 === i.indexOf(e) && (i.push(e), n = !0) } return n } function S(t, i) { if (t.baseTexture instanceof f.VL) { var n = t.baseTexture; return -1 === i.indexOf(n) && i.push(n), !0 } return !1 } function A(t, i) { if (t.Ft && t.Ft instanceof f.xE) { var n = t.Ft.baseTexture; return -1 === i.indexOf(n) && i.push(n), !0 } return !1 } function T(t, i) { return i instanceof m.xv && (i.updateText(!0), !0) } function M(t, i) { if (i instanceof m.pn) { var n = i.toFontString(); return m.Mr.measureFont(n), !0 } return !1 } function O(t, i) { if (t instanceof m.xv) { -1 === i.indexOf(t.style) && i.push(t.style), -1 === i.indexOf(t) && i.push(t); var n = t.Ft.baseTexture; return -1 === i.indexOf(n) && i.push(n), !0 } return !1 } function I(t, i) { return t instanceof m.pn && (-1 === i.indexOf(t) && i.push(t), !0) } function N(t, i) { return i instanceof f.VL && (i.et[t.CONTEXT_UID] || t.texture.bind(i), !0) } function R(t, i) { if (!(i instanceof _.TC)) return !1; var n = i.geometry; i.finishPoly(), n.updateBatches(); for (var s = n.batches, e = 0; e < s.length; e++) { var r = s[e].style.texture; r && N(t, r.baseTexture) } return n.batchable || t.geometry.bind(n, i.bn(t)), !0 } function P(t, i) { return t instanceof _.TC && (i.push(t), !0) } var x = function(t) { function i(i) { var n = t.call(this, i) || this; return n.uploadHookHelper = n.renderer, n.registerFindHook(P), n.registerUploadHook(N), n.registerUploadHook(R), n } return function(t, i) { function n() { this.constructor = t } g(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) }(i, t), i }(function() { function t(t) { var i = this; this.limiter = new y(u.X.UPLOADS_PER_FRAME), this.renderer = t, this.uploadHookHelper = null, this.queue = [], this.addHooks = [], this.uploadHooks = [], this.completes = [], this.ticking = !1, this.delayedTick = function() { i.queue && i.prepareItems() }, this.registerFindHook(O), this.registerFindHook(I), this.registerFindHook(E), this.registerFindHook(S), this.registerFindHook(A), this.registerUploadHook(T), this.registerUploadHook(M) } return t.prototype.upload = function(t, i) { "function" == typeof t && (i = t, t = null), t && this.add(t), this.queue.length ? (i && this.completes.push(i), this.ticking || (this.ticking = !0, a.vB.system.addOnce(this.tick, this, a.uF.UTILITY))) : i && i() }, t.prototype.tick = function() { setTimeout(this.delayedTick, 0) }, t.prototype.prepareItems = function() { for (this.limiter.beginFrame(); this.queue.length && this.limiter.allowedToUpload();) { var t = this.queue[0], i = !1; if (t && !t.Hi) for (var n = 0, s = this.uploadHooks.length; n < s; n++) if (this.uploadHooks[n](this.uploadHookHelper, t)) { this.queue.shift(), i = !0; break } i || this.queue.shift() } if (this.queue.length) a.vB.system.addOnce(this.tick, this, a.uF.UTILITY); else { this.ticking = !1; var e = this.completes.slice(0); this.completes.length = 0; for (n = 0, s = e.length; n < s; n++) e[n]() } }, t.prototype.registerFindHook = function(t) { return t && this.addHooks.push(t), this }, t.prototype.registerUploadHook = function(t) { return t && this.uploadHooks.push(t), this }, t.prototype.add = function(t) { for (var i = 0, n = this.addHooks.length; i < n && !this.addHooks[i](t, this.queue); i++); if (t instanceof c.W2) for (i = t.children.length - 1; i >= 0; i--) this.add(t.children[i]); return this }, t.prototype.destroy = function() { this.ticking && a.vB.system.remove(this.tick, this), this.ticking = !1, this.addHooks = null, this.uploadHooks = null, this.renderer = null, this.completes = null, this.queue = null, this.limiter = null, this.uploadHookHelper = null }, t }()); ! function() { function t(t) { this.maxMilliseconds = t, this.frameStart = 0 } t.prototype.beginFrame = function() { this.frameStart = Date.now() }, t.prototype.allowedToUpload = function() { return Date.now() - this.frameStart < this.maxMilliseconds } }(); function L(t, i) { let n = !1; if (t && t instanceof v.kC) { if (t.textures && t.textures.length) { for (const [s, e] of Object.entries(t.textures)) if (e instanceof f.xE) { const t = e.baseTexture; - 1 === i.indexOf(t) && (i.push(t), n = !0) } if (t.spritesheet && t.spritesheet instanceof p.c) { const s = t.spritesheet.baseTexture; - 1 === i.indexOf(s) && i.push(s), n = !0 } } if (t.texture && t.texture instanceof f.xE) { const s = t.texture.baseTexture; - 1 === i.indexOf(s) && i.push(s), n = !0 } } return n } f.Th.registerPlugin("prepare", x); let C = !1, U = null, k = null; const F = { lu(t) { U = t, k = U.plugins.prepare, k && (k.registerFindHook(L), C = !0) }, cu: (t, i) => C ? k.upload(t, i) : null, le: t => C ? k.add(t) : null }, B = class { constructor() { this.language = "en_US", this.fu = 0, At(), B.vu = this, St.pushState(St.State.Init), l.skipHello(), this.du(), this.app = new d.M({ autoStart: !1, backgroundColor: dt.gameConfig.GameBoard.CANVAS_BACKGROUND_COLOR, width: dt.BASE_SCREEN_WIDTH, height: dt.MAX_CANVAS_HEIGHT, sharedTicker: !0 }); const t = this.app.view; document.querySelector("#game-container").insertAdjacentElement("afterbegin", t), t.className = "g-canvas"; const i = t.getContext("webgl2") || t.getContext("webgl"); if (i) { i.getExtension("WEBGL_lose_context") && t.addEventListener("webglcontextlost", (() => { alert("Your device is unstable, please try again."), location.reload() })) } this.app.stop(), this.app.stage.destroy({ children: !0 }), this.app.stage = new b.Hf, F.lu(this.app.renderer), F.cu(this.app.stage, (() => { this.app.start() })); const n = new URL(window.location.href).searchParams.get("language"); o.isValid(n) && (this.language = n), r.S9.Initiate(), V.init(), V.loadLauncherResources().then((() => { const t = document.getElementById("loading-icon"); t.hidden = !0, t.parentElement.hidden = !0; const i = performance.now() - this.fu; setTimeout((() => { this.app.view.hidden = !1; document.getElementById("brand-logo").hidden = !0, r.zW.emit(r.SI.BRAND_LOGO_HIDED), document.querySelector(".logo-image>img").setAttribute("src", "") }), i > 4500 ? 0 : 4500 - i), // o.loadLanguage(this.language) , // ht.getInst().goToScene(ht.getInst().loadingScene); document.getElementById("landscape-to-portrait").querySelector(".landscape-text").textContent="Please rotate your device." })), this.app.ticker.add(r.b2.onUpdate, r.b2), this.app.ticker.add(r.kX.onUpdate, r.kX), this.app.loader.concurrency = 10 } static getInst() { return B.vu } du() { } getLoader() { return this.app.loader } getTicker() { return this.app.ticker } }; let D = B; D.vu = null; var j = n(7373), G = n.n(j); class W { static _u(t) { return [{ type: "spine", func: () => t.spineData }, { type: "atlas", func: () => t.textures }, { type: "texture", func: () => t.texture }, { type: "bfont", func: () => t.bitmapFont }, { type: "spritesheet", func: () => t.spritesheet }, { type: "blob", func: () => t.blob }, { type: "json", func: () => t.data }] } static pu(t) { let i = null; if (null == t ? void 0 : t.isComplete) { const n = this._u(t).find((t => t.func())); n && (i = { type: n.type, asset: n.func() }) } return i } static mu(t) { return null !== this.pu(t) } static bu(t) { t.texture && t.texture.destroy(!0), t.textures && Object.keys(t.textures).forEach((i => { const n = t.textures[i]; null == n || n.destroy(!0) })), t.spineData && (t.spineData = null), t.bitmapFont && t.bitmapFont.destroy(), t.spritesheet && t.spritesheet.destroy(!0), delete t.data } static wu({ name: t, weight: i = 700, style: n = "normal", urls: s, stretch: e = "normal" }, r, h) { if (document.querySelector(`style#${t}`)) return; const o = document.createElement("style"); let u = `@font-face{font-family:'${t}';src:`; s.forEach(((t, i) => { const n = t.lastIndexOf("."), e = t.slice(-(t.length - n - 1)); i > 0 && i < s.length && (u += ","), u += `url('${r}/${t}') format('${e}')` })), u += `;font-weight:${i};font-style:${n};}`, o.id = t, o.innerText = u, document.head.append(o); return new(G())(t, { style: n, weight: i, stretch: e }).load(null, h) } } var H = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); const X = class { static init() { this.gu().onLoad.add(((t, i) => { (null == i ? void 0 : i.isComplete) && F.cu(i) })) } static loadWebFonts() { if (this.yu) return new Promise((t => { const i = this.Eu.FontFaces; let n = i.length; const s = (i, s) => { --n <= 0 && t() }; i.forEach((t => { W.wu(t, this.Su(), this.Au).then((() => { s() })).catch((t => { s() })) })) })) } static loadBundleByPackId(t, i) { return new Promise((n => { let s = !1; if (t in this.Eu) { const n = this.Eu[t]; if (n && i) { const t = n[i]; null == t || t.forEach((t => { s = !0, this.Tu(t) })) } } s ? this.gu().load(((t, i) => { n(!0) })) : n(!1) })) } static loadBundle(t, i) { return new Promise((n => { let s = !1; if (t in this.Eu) { const n = this.Eu[t]; if (n) for (let t = 0; t < this.Mu.length; ++t) { const e = this.Mu[t]; if (null == i ? void 0 : i.includes(e)) continue; const r = n[e]; (null == r ? void 0 : r.length) > 0 && (s = !0, r.forEach((t => { this.Tu(t) }))) } } s ? this.gu().load(((t, i) => { n(!0) })) : n(!1) })) } static Tu(t) { return H(this, null, (function*() { var i, n; const s = { name: null != (i = null == t ? void 0 : t.name) ? i : void 0, url: `${this.Su()}/${t.path}` }, e = `${t.type}`.toLowerCase(); "spine" === e ? ((null == t ? void 0 : t.atlasFile) && (s.metadata = { spineAtlasFile: `${this.Su()}/${t.atlasFile}` }), s.url += ".skel") : "json" === e && (s.url.endsWith("json") || (s.url += ".json")); const h = t.supportedLanguages; !0 === t.releaseInGame && (this.Ou.push(t.name), "Spine" === t.type && this.Ou.push(t.name + "_atlas")); const u = new URL(window.location.href), a = u.searchParams.get("language"), l = a && (null == h ? void 0 : h.includes(a)) ? a : o.getDefaultLanguage(); (null == (n = s.name) ? void 0 : n.includes("")) && (s.name = s.name.replace("", l)), s.url.includes("") && (s.url = s.url.replace("", l)); const c = t.supportedBrands, f = u.searchParams.get("brand"), v = f ? f.toLocaleLowerCase() : null, d = v && (null == c ? void 0 : c.includes(v)) ? v : "default"; if (s.url.includes("")) { let t = s.url.replace("", d); if ("default" !== d) { r.cQ.checkUrlExists(t) || (t = s.url.replace("", "default")) } s.url = t } this.gu().add(s) })) } static loadLauncherResources() { return H(this, null, (function*() { return yield this.Iu(), new Promise(((t, i) => { const n = this.Eu.Launcher.init; null == n || n.forEach((t => { this.Tu(t) })), this.gu().onError.add(((t, n) => { i(t) })), this.gu().load(((i, n) => { t(n) })) })) })) } static loadLoadingResources() { return H(this, null, (function*() { return new Promise(((t, i) => { const n = this.Eu.Launcher.loading; null == n || n.forEach((t => { this.Tu(t) })), this.gu().onError.add(((t, n) => { i(t) })), this.gu().load(((i, n) => { t(n) })) })) })) } static Iu() { return H(this, null, (function*() { return new Promise(((t, i) => { this.gu().add(this.Nu, `${this.Su()}/resources.json`), this.gu().onError.add(((t, n) => { i(t) })), this.gu().load(((i, n) => { if (this.Eu = this.getJsonData(this.Nu), !this.Eu) throw new Error("Missing resource configs"); this.yu = !0, t(n) })) })) })) } static getSpine(t) { const i = this.Ru(t); return (null == i ? void 0 : i.isComplete) && i.spineData ? i.spineData : null } static getTexture(t) { const i = this.Ru(t); return (null == i ? void 0 : i.isComplete) && i.texture ? i.texture : null } static getJsonData(t) { const i = this.Ru(t); return (null == i ? void 0 : i.isComplete) && i.data ? i.data : null } static getAtlas(t) { const i = this.Ru(t); return (null == i ? void 0 : i.isComplete) && i.textures ? i.textures : null } static getAtlasFrame(t, i) { const n = this.Ru(t); return (null == n ? void 0 : n.isComplete) && n.textures[i] ? n.textures[i] : null } static getResourceLoader(t) { const i = this.Ru(t); return (null == i ? void 0 : i.isComplete) && W.pu(i) ? i : null } static isResourceLoaded(t) { const i = this.Ru(t); return W.mu(i) } static getTextureAsync(t, i) { return new Promise((n => { const s = this.Ru(t); (null == s ? void 0 : s.isComplete) && s.texture ? n(s.texture) : this.Pu.push({ owner: i, assets: [{ name: t }], callback: t => { n(t[0].data) } }) })) } static getAtlasAsync(t, i) { return new Promise((n => { const s = this.getResources()[t]; (null == s ? void 0 : s.isComplete) && s.textures ? n(s.textures) : this.Pu.push({ owner: i, assets: [{ name: t }], callback: t => { n(t[0].data) } }) })) } static getAssetAsync(t, i) { return new Promise((n => { var s; const e = this.Ru(t), r = null == (s = W.pu(e)) ? void 0 : s.asset; (null == e ? void 0 : e.isComplete) && r ? n(r) : this.Pu.push({ owner: i, assets: [{ name: t }], callback: t => { n(t[0].data) } }) })) } static getSpineAsync(t, i) { return new Promise((n => { const s = this.Ru(t); (null == s ? void 0 : s.isComplete) && s.spineData ? n(s.spineData) : this.Pu.push({ owner: i, assets: [{ name: t }], callback: t => { n(t[0].data) } }) })) } static releaseUnnecessaryResources() { let t = !0; this.Ou.forEach((i => { !1 === this.isResourceLoaded(i) && (t = !1) })), t ? r.b2.setTimeout(3e3, (() => { this.Ou.forEach((t => { this.releaseResource(t) })) })) : r.b2.setTimeout(1e3, (() => { this.releaseUnnecessaryResources() })) } static isAssetReady(t) { if (this.Pu.length > 0) for (let i = 0; i < this.Pu.length; ++i) if (this.Pu[i].owner === t) return !1; return !0 } static releaseResource(t) { const i = this.Ru(t); i && (W.bu(i), delete this.getResources()[t]) } static releaseResourcesByPrefix(t) { var i, n; const s = null != (n = null == (i = this.gu()) ? void 0 : i.resources) ? n : null; if (!s) throw new Error("ResourceStorage is null"); for (const i in s) i.startsWith(t) && X.releaseResource(i) } static getResources() { var t, i; const n = null != (i = null == (t = this.gu()) ? void 0 : t.resources) ? i : null; if (!n) throw new Error("ResourceStorage is null"); return n } static Ru(t) { return this.getResources()[t] } static gu() { return this.xu || (this.xu = D.getInst().getLoader()), this.xu } static Su() { return "Mahjong Phoenix_files" } static destroy() { this.Nu = null, this.Mu = null, this.Au = null, this.yu = null, this.xu = null, this.Eu = null, this.Pu.length = 0 } }; let V = X; V.Pu = [], V.Nu = "res-cfg", V.Mu = ["common"], V.Au = 2e4, V.Ou = []; var $ = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); class Y { constructor() {} Lu(t, i) { return $(this, null, (function*() { V.getSpineAsync(t, this).then(i) })) } Cu(t, i) { return $(this, null, (function*() { V.getAtlasAsync(t, this).then(i) })) } Uu(t, i) { return $(this, null, (function*() { V.getTextureAsync(t, this).then(i) })) } ku() { return $(this, null, (function*() { V.isAssetReady(this) || (yield this.showLoadResourcePopup()) })) } showLoadResourcePopup() { return $(this, null, (function*() {})) } } const z = new Map([ ["320x480", "IPhone 4S, 4, 3GS, 3G, 1st gen"], ["320x568", "IPhone 5, SE 1st Gen,5C, 5S"], ["375x667", "IPhone SE 2nd Gen, 6, 6S, 7, 8"], ["414x736", "IPhone 8+"], ["476x847", "IPhone 7+, 6+, 6S+"] ]), K = class { constructor() { if (this.Fu = !1, this.Bu = {}, this.Du = {}, this.Fu = (() => { if (window.navigator.userAgent.toLowerCase().includes("mobi") && !window.navigator.userAgent.includes("Android")) { const t = `${window.screen.width}x${window.screen.height}`; return !!z.get(t) } return !1 })(), !1 === this.Fu) { dt.gameConfig.SymbolList.forEach((t => { this.Bu[t] = []; const i = `symbol_${t}-skeleton`; for (let n = 0; n < dt.gameConfig.CachePool.INITIAL_POOL_SIZE_PER_SYMBOL; n++) { const n = V.getSpine(i); if (n) { const i = new w.PY(n); i.zIndex = dt.gameConfig.SymbolType.isOnTop(t) ? 0 : Number(t), this.Bu[t].push(i) } } })); const t = dt.gameConfig.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL * dt.gameConfig.GameBoard.NUMBER_OF_REELS + 1; this.Bu.symbol_effect = []; const i = V.getSpine("symbol_effect"); for (let n = 0; n < t; n++) { const t = new w.PY(i); t.visible = !1, this.Bu.symbol_effect.push(t) } } } static getInst() { return K.vu || (K.vu = new K), K.vu } getSymbolSpineByKey(t) { const i = t => { dt.gameConfig.BE_RESPONSE_FORMAT === ft.MEGA_SYMBOL && (t = t.split("_")[0]); return new w.PY(V.getSpine(`symbol_${t}-skeleton`)) }; return !1 === this.Fu ? this.Bu[t].length <= 0 ? i(t) : this.Bu[t].pop() : i(t) } getSpineWithKey(t) { if (!0 === this.Fu || this.Bu[t].length <= 0) { return new w.PY(V.getSpine(t)) } return this.Bu[t].pop() } returnSymbolSpine(t, i) { i.parent && i.parent.removeChild(i), !0 === this.Fu || "symbol_effect" !== t && this.Bu[t].length >= dt.gameConfig.CachePool.MAX_POOL_SIZE_PER_SYMBOL ? i.destroy({ children: !0 }) : (r.cQ.cleanSpine(i), this.Bu[t].push(i)) } getSpecialTextSpineByKey(t) { if (!0 === this.Fu || this.Du[t].length <= 0) { return new w.PY(V.getSpine(`${this.ju(t)}-skeleton`)) } return this.Du[t].pop() } returnSpecialTextSpine(t, i) { i.parent && i.parent.removeChild(i), !0 === this.Fu ? i.destroy({ children: !0 }) : this.Du[t].push(i) } ju(t) { switch (t) { case dt.gameConfig.SymbolType.SymbolBonus: return "bonus"; case dt.gameConfig.SymbolType.SymbolScatter: return "scatter"; case dt.gameConfig.SymbolType.SymbolWild: return "wild" } } }; let q = K; q.vu = null; var Z = n(3567), J = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); const Q = class { constructor() { this.Gu = null } static getInst() { return Q.Wu || (Q.Wu = new Q), Q.Wu } loadConfigs() { return J(this, null, (function*() { const t = r.cQ.getAbsoluteURLOnWeb("../../config/") + "central-config.json?v=" + Math.random(); r.cQ.isUrlExists(t) || Z.Cg.getConfirmPopup().open(o.getText("MSG_SOCKET_ERROR"), o.getText("TXT_YES"), (() => { location.reload() })); const i = yield fetch(t); this.Gu = yield i.json(), yield this.Hu(), r.JK.setShowCredit(this.Gu.creditCurrencyConfig) })) } Hu() { return J(this, null, (function*() { const t = new URLSearchParams(window.location.search), i = t.get("game"), n = t.get("merchantCode"); let s = r.cQ.getAbsoluteURLOnWeb(this.gameconfigPHP); if (s += i && !n ? `?game=${i}&v=${Math.random()}` : !i && n ? `?merchantCode=${n}&v=${Math.random()}` : i && n ? `?game=${i}&merchantCode=${n}&v=${Math.random()}` : `?v=${Math.random()}`, r.cQ.isUrlExists(s)) try { const t = yield fetch(s), i = yield t.json(); if (i) { const t = i.wsBaseURL; t && (this.Gu.wsBaseURL = t); const n = i.wsEncryption; n && (this.Gu.wsEncryption = n); const s = i.creditCurrencyConfig; s && (this.Gu.creditCurrencyConfig = s); const e = i.hideGameCurrency; e && (this.Gu.hideGameCurrency = e); const r = i.currencyList; r && (this.Gu.currencyList = r); let h = i.isCheckShowDemo; void 0 !== h || (h = this.Gu.isCheckShowDemo), this.Gu.isCheckShowDemo = h; const o = i.betHistory; o && (o.url && (this.Gu.betHistory.url = o.url), o.detailURL && (this.Gu.betHistory.detailURL = o.detailURL), void 0 !== o.dateSelector && (this.Gu.betHistory.dateSelector = o.dateSelector), void 0 !== o.demoBetHistory && (this.Gu.betHistory.demoBetHistory = o.demoBetHistory)) } } catch (t) {} })) } get wsBaseURL() { return this.Gu.wsBaseURL } get wsEncryption() { return this.Gu.wsEncryption } get creditCurrencyConfig() { return this.Gu.creditCurrencyConfig || "default" } get hideGameCurrency() { return this.Gu.hideGameCurrency } get currencyList() { return this.Gu.currencyList } get gameconfigPHP() { return this.Gu.gameconfigPHP } get gameCode() { return dt.gameConfig.GAME_CODE } get tournament() { return this.Gu.tournament } get betHistory() { return this.Gu.betHistory } get isCheckShowDemo() { return this.Gu.isCheckShowDemo } }; let tt = Q; tt.Wu = null; const it = class extends c.W2 { constructor(t, i = 0) { super(), this.Xu = t, this.Vu = i, it.activatedContainers.push(this) } destroy(t) { it.activatedContainers.forEach(((t, i, n) => { this === t && n.splice(i, 1) })), super.destroy(t) } setPosition(t, i, n, s, e, r, h, o, u) { const a = h / u; let l = 0; switch (this.Xu) { case "TOP": l = -a; break; case "BOTTOM": l = i - a; break; case "CENTER": l = i / 2 - a } if (this.position.y = this.Vu + l, this.$u && this.$u(t, i, n, s, e, r, h, o, u), this.Yu) { const t = Math.max((Math.round(i) - s) / (r - s), 0); this.Yu(a, t) } } get alignType() { return this.Xu } set alignType(t) { this.Xu = t } get offsetY() { return this.Vu } set offsetY(t) { this.Vu = t } addResizeListener(t) { this.$u = t } addExpandSizeListener(t) { this.Yu = t } removeResizeListener() { this.$u = void 0, this.Yu = void 0 } static onSizeChanged(t) { it.activatedContainers.forEach((i => { i.setPosition(t.realWidth, t.realHeight, t.baseWidth, t.baseHeight, t.maxWidth, t.maxHeight, t.offsetY, t.scaleX, t.scaleY) })) } }; let nt = it; nt.activatedContainers = []; const st = class extends c.W2 { constructor() { super(), st.activatedContainers.push(this) } destroy(t) { st.activatedContainers.forEach(((t, i, n) => { this === t && n.splice(i, 1) })), super.destroy(t) } update(t) {} }; let et = st; et.activatedContainers = []; const rt = class { constructor() { this.container = null, this.curScene = null, this.container = new c.W2, D.getInst().app.ticker.add(this.onUpdate, this) } static getInst() { return rt.vu || (rt.vu = new rt), rt.vu } onUpdate(t) { const i = t / u.X.TARGET_FPMS / 1e3; this.curScene && this.curScene.update(i), et.activatedContainers.forEach((t => { t.update(i) })) } goToScene(t, i = !1) { if (this.curScene) { this.curScene.deactive(); const i = this.curScene; r.kX.to(150, i.container, { alpha: 0 }, 0, (() => { i.container.visible = !1 })), t.container.visible = !0, t.container.alpha = 0, r.kX.to(150, t.container, { alpha: 1 }) } else t.container.visible = !0; this.curScene = t, this.curScene.active(i) } onVisibilityChange(t) { this.curScene && (t ? this.curScene.onResume() : this.curScene.onPause()) } }; let ht = rt; ht.vu = null; const ot = class { constructor() { this.container = null, ot.allScenes.push(this), this.container = new c.W2, ht.getInst().container.addChild(this.container) } onWSConnected() {} onWSError(t) {} onWSReconnect(t) {} destroy(t) { this.container.destroy(t) } }; let ut = ot; ut.allScenes = []; class at extends ut { static set gameScene(t) { at.zu = t } static get gameScene() { return at.zu } } class lt extends ut { static set loadingScene(t) { lt.Ku = t } static get loadingScene() { return lt.Ku } } var ct = (t => (t.LINE_GAME = "line", t.WAY_GAME = "way", t.MEGAWAYS = "megaway", t))(ct || {}), ft = (t => (t.NORMAL = "normal", t.MEGA_SYMBOL = "mega_symbol", t))(ft || {}), vt = (t => (t.BOARD = "board", t.REEL = "reel", t.SPRITE = "sprite", t))(vt || {}); class dt {} dt.gameConfig = null, dt.BASE_SCREEN_WIDTH = 810, dt.BASE_SCREEN_HEIGHT = 1440, dt.MAX_CANVAS_WIDTH = 810, dt.MAX_CANVAS_HEIGHT = 1800, dt.MAX_CANVAS_MARGIN_Y = 180, dt.SKIP_SOUND_COOKIE_SAVE = !0; const _t = class { constructor() { this.qu = 16 / 9, this.Zu = 19.5 / 9, this.Ju = { baseWidth: dt.BASE_SCREEN_WIDTH, baseHeight: dt.BASE_SCREEN_HEIGHT, maxWidth: dt.MAX_CANVAS_WIDTH, maxHeight: dt.MAX_CANVAS_HEIGHT } } static getInst() { return _t.vu || (_t.vu = new _t), _t.vu } init(t, i, n, s = !0) { this.dh = t, this.Qu = t.parentElement, this.ta = i, this.ia = n, this.Qu.style["-webkit-transform"] = "rotate(0deg)", this.Qu.style.transform = "rotate(0deg)", window.addEventListener("resize", this.onResize.bind(this)), window.addEventListener("orientationchange", this.onResize.bind(this)), s && this.onResize() } onResize() { const t = dt.BASE_SCREEN_WIDTH, i = dt.BASE_SCREEN_HEIGHT, n = dt.MAX_CANVAS_HEIGHT, [s, e] = this.na(), r = e / s; let h, o; r <= this.qu ? (h = { width: t, height: i }, o = { container: 0, content: 2 }) : r <= this.Zu ? (h = { width: t, height: n }, o = { container: 1, content: 4 }) : (h = { width: t, height: n }, o = { container: 0, content: 2 }), this.sa(h, o), this.ea(), this.ra() } sa(t, i) { this.ha(i.container, t), this.oa(i.content, t) } ua(t, i) { this.Qu.style.width = t + "px", this.Qu.style.height = i + "px", this.dh.width = t * devicePixelRatio, this.dh.height = i * devicePixelRatio } ha(t, i) { const [n, s] = this.na(), e = i.width, r = i.height, h = this.Qu.style; let o, u, a = 1, l = 1; switch (t) { case 0: a = n / e, l = s / r, a < l ? (o = n, u = r * a) : (o = e * l, u = s); const t = Math.round((n - o) / 2), i = Math.round((s - u) / 2); o = n - 2 * t, u = s - 2 * i, this.ua(o, u), h.margin = "0px", h.paddingLeft = t + "px", h.paddingRight = t + "px", h.paddingTop = i + "px", h.paddingBottom = i + "px"; break; case 1: this.ua(n, s), h.padding = "0px 0px", h.margin = "0px" } } oa(t, i) { const n = i.width, s = i.height, e = this.dh.width, r = this.dh.height; let h, o, u = 1, a = 1, l = 0; switch (t) { case 0: u = e / n, a = r / s, h = e, o = r; break; case 1: u = e / n, a = r / s, u < a ? (l = u, h = e, o = s * l) : (l = a, h = n * l, o = r), u = a = l; break; case 2: u = e / n, a = r / s, u < a ? (l = a, h = n * l, o = r) : (l = u, h = e, o = s * l), u = a = l; break; case 3: l = r / s, h = e, o = r, u = a = l; break; case 4: l = e / n, h = e, o = r, u = a = l } Math.abs(e - h) < 2 && (h = e), Math.abs(r - o) < 2 && (o = r), this.ta.resize(h, o), this.ia.scale.set(u, a), this.aa(n, s, h, o, u, a) } aa(t, i, n, s, e, r) { this.Ju.designedWidth = t, this.Ju.designedHeight = i, this.Ju.width = n, this.Ju.height = s, this.Ju.scaleX = e, this.Ju.scaleY = r, this.Ju.realWidth = n / e, this.Ju.realHeight = s / r } ea() { const t = Math.round(this.Ju.realHeight) - this.Ju.baseHeight, i = Math.max(t / (2 / this.Ju.scaleY), 0); this.ia.position.y = i, this.Ju.offsetY = i } ra() { nt.onSizeChanged(this.Ju) } na() { return [window.innerWidth, window.innerHeight] } }; let pt = _t; pt.vu = null; var mt = n(7171); class bt { static la(t) { var i; return null != (i = t.Bo) ? i : -1 } static ca(t) { return t.Co } static fa(t) { return t.po } static va(t) { return t.Wo } static da(t) { return t.Do } static _a(t) { return t.pa } static ma(t) { return t.no } } class wt { static ba() { return mt.Howler.ho } static wa(t) { var i; return null != (i = t._o) ? i : [] } static ga(t) { var i; return null != (i = t.Un) ? i : [] } static ya(t) { var i; return null != (i = t.Lo) && i } static Ea(t, i) { const n = []; return this.wa(t).forEach((t => { t.Oo == i && (t.Co || n.push(t.Uo)) })), n } static Sa(t, i) { var n; const s = this.Aa(t, i); return s ? null != (n = bt.ma(s).paused) && n : null } static Ta(t, i) { const n = []; return this.wa(t).forEach((t => { t.Oo == i && (t.Co || t.po && n.push(t.Uo)) })), n } static Aa(t, i) { return this.wa(t).find((t => t.Uo === i)) } static Ma(t) { var i; const n = this.ga(t); if (n.length > 0) { t.Un = []; for (let t = 0; t < n.length; t++) { const s = n[t]; null == (i = s.action) || i.call(s) } } } static Oa(t, i) { return !!this.Aa(t, i) } static Ia(t, i) { const n = this.Oa(t, i) ? t.rate(i) : null; let s = -1; return null !== n && (s = Number.parseFloat(n + ""), Number.isNaN(s) && (t.rate(1), s = 1)), s } static Na(t, i, n) { const s = this.Oa(t, i) ? t.rate(n, i) : null, e = Number.parseFloat(s + ""); if (s === t) { this.Ia(t, i) } else if (Number.isNaN(e)) return t.rate(1), 1 } static Ra(t, i) { return this.Oa(t, i) ? t.playing(i) : null } static Pa(t, i) { return this.Oa(t, i) ? t.volume(i) : -1 } static xa(t, i) { return this.Oa(t, i) ? t.seek(i) : -1 } static La(t, i = -1) { return i > -1 ? this.Oa(t, i) ? t.duration(i) : -1 : t.duration() } static Ca(t, i) { const n = this.Aa(t, i); if (n) { const s = bt.la(n), e = this.xa(t, i), r = this.La(t, i); return this.Ua((e - s) / r) } return -1 } static Ua(t, i = 2) { const n = 10 ** i; return Math.round((t + Number.EPSILON) * n) / n } static ka(t) { var i; const n = Object.keys(null != (i = t.sprite) ? i : {}).length; return t.pool = Math.max(Math.round(2 * n / 3), 5), t } static Fa(t) { const i = Number.parseFloat(t + ""); if (Number.isNaN(i)) return -1; return Math.min(1, Math.max(0, t)) } } class gt { constructor() { this.Ba = !1, this.Da = !1, this.ja = 0, this.Ga = null } init(t) { this.Wa = t; const i = V.getJsonData("sound-cfg"); if (!i) return; [...this.Wa.PreloadPacks, ...this.Wa.InGamePacks].forEach((t => { if (t in i) { const n = this.Ha(i[t], t), s = new mt.Howl(n); this.Wa.howlMap.set(t, s) } })) } initPack(t) { const i = V.getJsonData("sound-cfg"); if (i && t in i) { const n = this.Ha(i[t], t), s = new mt.Howl(n); this.Wa.howlMap.set(t, s), this.Xa(t, null, null) } } Ha(t, i) { const n = t, s = "Mahjong Phoenix_files"; return n.src instanceof Array ? n.src.forEach(((t, i, n) => { t.includes(`${s}/`) || (n[i] = `${s}/${t}`) })) : n.src = `${s}/${n.src}`, n.pool || wt.ka(n), n.preload = !1, n.format = ["mp3"], n.onplayerror = (t, i) => {}, n } loadBundle(t) { return i = this, n = null, s = function*() { const i = "PreGame" === t ? this.Wa.PreloadPacks : this.Wa.InGamePacks; yield this.Va(t, i), "PreGame" === t ? this.Ba = !0 : this.Da = !0 }, new Promise(((t, e) => { var r = t => { try { o(s.next(t)) } catch (t) { e(t) } }, h = t => { try { o(s.throw(t)) } catch (t) { e(t) } }, o = i => i.done ? t(i.value) : Promise.resolve(i.value).then(r, h); o((s = s.apply(i, n)).next()) })); var i, n, s } Va(t, i) { return new Promise((n => { const s = i.length; if (s < 1) return void n(); let e = 0, r = null; const h = i => { for (let o = this.ja; o < this.Wa.LoadConcurrency && i.length > 0; o++) { const o = i.shift(); this.Xa(o, (t => { ++this.ja }), ((o, u) => { --this.ja, r || (r = u), ++e < s ? h(i) : this.Ga ? (this.Ga(), this.Ga = null) : (this.$a(t, r), n()) })) } }; h(i) })) } Xa(t, i, n) { const s = this.Wa.howlMap.get(t); null == s || s.on("load", (() => { null == n || n(t, null) })), null == s || s.on("loaderror", ((i, s) => { null == n || n(t, s) })), null == s || s.load(), null == i || i(t) } $a(t, i) { r.zW.emit(r.fb.LOAD_AUDIO, t, i) } getSound(t) { const i = this.Wa.SoundNames.indexOf(t); if (-1 === i) return null; const n = this.Wa.RawConfigs[i]; return { pack: this.Ya(n, "p", void 0), sprite: this.Ya(n, "s", void 0), loop: 1 === this.Ya(n, "l", 0), volume: this.Ya(n, "v", 1), isMusic: 1 === this.Ya(n, "m", 0) } } Ya(t, i, n) { var s; return null != (s = t[i]) ? s : n } } class yt { constructor(t) { this.za = () => { var t; null == (t = this.gr) || t.call(this) }, this.gr = t } binding() { document.addEventListener("touchstart", this.za, !0), document.addEventListener("touchend", this.za, !0), document.addEventListener("click", this.za, !0), document.addEventListener("keydown", this.za, !0) } unbind() { document.removeEventListener("touchstart", this.za, !0), document.removeEventListener("touchend", this.za, !0), document.removeEventListener("click", this.za, !0), document.removeEventListener("keydown", this.za, !0) } } class Et { constructor() { this.Ka = { qa: 80, Za: 1, Ja: 1, Qa: 10, tl: 10, il: 2e3 }, this.nl = new gt, this.sl = new Map, this.el = new Map, this.rl = "NONE", this.hl = "NONE", this.ul = !0, this.al = !1, this.ll = !1, this.cl = !1, this.fl = [], this.dl = !1, this._l = 0, this.pl = 1e3, this.ml = 1e3, this.bl = new yt(this.wl.bind(this)), this.bl.binding(), mt.Howler.autoSuspend = !1, mt.Howler.volume(this.Ka.Za), this.El = { audioUnlocked: !1, suspendContext: !1, isGameStarted: !1, LoadConcurrency: 2, howlMap: new Map }, window.addEventListener("focus", this.Sl.bind(this)), window.addEventListener("pointerdown", this.Al.bind(this)) } static getInst() { if (!globalThis[this.Tl]) { if (!globalThis[this.Ml]) return null; globalThis[this.Tl] = new globalThis[this.Ml], delete globalThis[this.Ml] } return globalThis[this.Tl] } init(t) { this.ll || (this.El = Object.assign(this.El, t), this.nl.init(this.El), this.ll = !0) } loadSetting() {} onLoadingProgress(t) { this.ll && t >= this.Ka.qa && !this.cl && (this.cl = !0, this.nl.loadBundle("PreGame")) } loadSounds(t) { this.ll && (this.nl.loadBundle(t), "PreGame" === t && (this.cl = !0)) } checkReloadSounds() { if (r.cQ.isIosAgent() && this.ml - this.pl > this.Ka.il) { const t = new Set(["spk2", "spk3"]); for (const i of t) { const t = this.El.howlMap.get(i); t && (t.unload(), this.nl.initPack(i)) } this.pl = this.ml } } playMusic(t, i = "BGM", n, s, e, r) { if ("NONE" === t) return -1; let h = -1; this.pause("BGM" === i ? this.rl : this.hl); const o = this.nl.getSound(t), u = this.Ol(n, o.volume), a = (t, i, n, e, r, h) => { h.isInitDone && h.onInitialized && (h.onInitialized(), h.onInitialized = null), null == s || s(t, i, n, e, r), this.ul || e.pause(r) }; if (this.sl.has(t)) { const { howl: i, playInfos: n } = this.sl.get(t), s = n[0]; r || i.seek(0, s.playId); const e = i.play(s.playId); i.volume(u, e), null == a || a(this, t, o, i, e, s) } else h = this.Nl(t, o, u, o.loop, this.Ka.Ja, a, e, !0); return "BGM" === i ? this.rl = t : this.hl = t, h } playSfx(t, i, n, s, e, r) { if (!this.ul || !this.El.isGameStarted) return -1; if (!this.El.SoundNames.includes(t) || "NONE" === t) return -1; const h = this.nl.getSound(t), o = this.Ol(i, h.volume), u = !0 === n || !1 === n ? n : h.loop, a = this.Ol(s, 1); return this.Nl(t, h, o, u, a, e, r, !1) } isPlaying(t, i = !1) { let n = !1; if (this.sl.has(t)) { const { howl: s, playInfos: e } = this.sl.get(t); e.forEach((t => { if (s.playing(t.playId) || i && wt.Sa(s, t.playId)) return n = !0, n })) } return n } stop(t) { if (this.sl.has(t)) { const { howl: i, playInfos: n } = this.sl.get(t); n.forEach((t => { i.stop(t.playId) })) } } pause(t) { if (this.sl.has(t)) { const { howl: i, playInfos: n } = this.sl.get(t); n.forEach((t => { i.pause(t.playId) })) } } resume(t, i) { let n = !1; if (this.sl.has(t)) { const { howl: s, playInfos: e } = this.sl.get(t); e.forEach((e => { const r = wt.Pa(s, e.playId); if (s.play(e.playId), i && r <= 0) { const i = this.nl.getSound(t); s.volume(i.volume, e.playId) } n = !0 })) } return n } rate(t, i) { if (this.sl.has(t)) { const { howl: n, playInfos: s } = this.sl.get(t); s.forEach((t => { wt.Na(n, t.playId, i) })) } } Nl(t, i, n, s, e, h, o, u) { if (!this.El.SoundNames.includes(t)) return -1; const a = this.El.howlMap.get(i.pack); if (!a) return -1; if ("loaded" !== a.state() && !u) return a.state(), -1; const l = a.play(i.sprite); if (null === l) return -1; this.ml = l, wt.Na(a, l, e), a.volume(n, l), a.loop(s, l), a.mute(!0, l); const c = { playId: l, isMusic: u, isFading: !1, isInitDone: !1 }, f = i => { if (this.sl.has(t)) { const n = this.sl.get(t), s = n.playInfos.findIndex((t => t.playId === i)); s > -1 && n.playInfos.splice(s, 1), 0 === n.playInfos.length && this.sl.delete(t) } a.off("end", null, l), a.off("stop", null, l), o && (c.isFading ? this.el.set(t, { howl: a, playId: l, callback: o }) : o(l)) }; if (a.once("stop", f.bind(this), l), !s && a.once("end", f.bind(this), l), n > 0 && r.b2.setTimeout(0, (() => { 0 === wt.Pa(a, l) && a.volume(n, l) })), this.sl.has(t)) { const i = this.sl.get(t); i.playInfos.push(c) } else this.sl.set(t, { howl: a, playInfos: [c] }); let v = 0, d = null; const _ = () => { if (wt.xa(a, l) >= 0) { if (a.off("unlock", _, l), r.b2.clearInterval(d), a.seek(0, l), 0 === n) a.pause(l); else { const t = !0; 0 === a.volume(l) && t && a.volume(n, l) } a.mute(!1, l), c.isInitDone = !0, null == h || h(this, t, i, a, l, c) } else ++v >= this.Ka.tl && (r.b2.clearInterval(d), a.stop(l), f(l), this.fl = this.fl.filter((t => t !== p))) }, p = () => { d = r.b2.setInterval(this.Ka.Qa, _) }; return this.El.audioUnlocked ? p() : u ? this.fl.push(p) : f(l), l } fade(t, i, n, s, e, h, o, u = .75, a = !0, l = -1) { var c; if (!this.El.isGameStarted) return -1; if (!this.sl.has(t)) { const i = this.el.get(t); return i && wt.Ra(i.howl, i.playId) && (null == (c = i.callback) || c.call(i, i.playId), this.el.delete(t)), -1 } const { howl: f, playInfos: v } = this.sl.get(t); let d = a ? 0 : v.length - 1; v.forEach(((t, i, n) => { if (a) { if (!t.isFading) return void(d = i) } else { const t = n.length - 1 - i; if (!n[t].isFading) return void(d = t) } })); const _ = v[d], p = _.playId, m = this.nl.getSound(t); if ("loaded" !== f.state()) return -1; if (this.al && t === this.rl) return -1; if (!_.isInitDone) return _.onInitialized = () => this.fade.apply(this, arguments), 0; i = "AUTO" === i ? f.volume(p) : i, n = "AUTO" === n ? m.volume : n; return wt.Fa(i) < 0 || wt.Fa(n) < 0 ? -1 : i === n ? (null == o || o(), void(null == h || h())) : this.ul ? (_.isFading && (_.isFading = !1, f.off("fade", null, p)), f.playing(p) || f.play(p), f.once("fade", (t => { i > n && 0 === n && (e ? f.stop(t) : f.pause(t)), null == h || h(), _.isFading = !1 }), p), n > 0 && (m && m.isMusic || this.El.MusicIds.includes(t)) && (this.rl = t), o && u >= 0 && u <= 1 && r.b2.setTimeout(s * u, o), f.volume(i, p), f.fade(i, n, s, p), void(_.isFading = !0)) : (m.isMusic && (this.rl = t), -1) } transitionToMusic(t, i, n = 500, s = !1, e = 500, r = .75) { const h = () => { this.isPlaying(i) ? this.fade(i, 0, "AUTO", e, !1) : this.playMusic(i, "BGM", 0, ((t, i) => { t.fade(i, 0, "AUTO", e, !1) })) }; (t = "AUTO" !== t ? t : this.rl) === i || this.isPlaying(t) ? this.isPlaying(t) && (n ? this.fade(t, "AUTO", 0, n, s, null, h.bind(this), r) : (s ? this.stop(t) : this.pause(t), h())) : h() } setSoundOption(t) { mt.Howler.volume(t ? 1 : 0), this.ul = t, t ? this.resume(this.rl, !0) : this.pause(this.rl) } Sl() { this.dl && r.b2.setTimeout(500, (() => { this.Rl() })) } Al() { this._l > 0 && (this.Rl(), this._l--) } Rl() { this.checkResumeContext().then((() => { this.dl = !0; let t = !1; this.sl.forEach(((i, n) => { const { howl: s, playInfos: e } = i; e.forEach((i => { i.isMusic && (n !== this.rl || n === this.rl && this.al) || (i.isMusic && n === this.rl || !i.isMusic) && (i.isMusic && !t && (t = !0), s.play(i.playId)) })) })), mt.Howler.mute(!1) })).catch((t => { mt.Howler.mute(!1) })) } Pl() { var t; this.sl.forEach((t => { const { howl: i, playInfos: n } = t; n.forEach((t => i.pause(t.playId))) })), mt.Howler.mute(!0), this._l = 2, mt.Howler.ctx && (this.El.suspendContext ? mt.Howler.ctx.suspend().catch((t => {})) : t = mt.Howler.ctx), this.dl = !0 } checkResumeContext() { return new Promise(((t, i) => { mt.Howler.ctx ? "running" !== mt.Howler.ctx.state ? mt.Howler.ctx.resume().then((() => { t() })).catch((t => { i(t) })) : t() : this.sl.size > 0 ? i("AudioContext is null") : t() })) } get isDisableMusic() { return this.al } disableMusic() { this.al = !0 } enableMusic() { this.al = !1 } minimizeBgm(t, i = 1e3) { if (this.sl.has(this.rl)) return this.fade(this.rl, "AUTO", t, i, !1) } restoreBgm(t = 1e3) { return this.fade(this.rl, "AUTO", "AUTO", t, !1) } wl() { this.El.audioUnlocked || (this.bl.unbind(), this.fl.forEach((t => t())), this.fl.length = 0, this.El.audioUnlocked = !0) } onVisibilityChange(t) { t ? this.Rl() : this.Pl() } getBgmId() { return this.rl } onGameStart() { this.El.isGameStarted = !0 } Ol(t, i) { const n = Number.parseFloat(`${t}`); return Number.isNaN(n) ? i : n } } Et.Tl = "_sndInst", Et.Ml = "_sndClass"; n(7554); class St { static curState() { return this.xl[this.xl.length - 1] } static curStack() { return this.xl } static pushState(t) { this.xl.push(t) } static popState() { this.xl.pop() } static clearStates() { this.xl = [] } } St.xl = [], (t => { let i; var n; (n = i = t.State || (t.State = {})).Init = "init", n.Loading = "loading", n.MainGame = "game", n.MiniGame = "mini-game", n.Menu = "Menu", n.Popup = "Popup" })(St || (St = {})); const At = () => { Object.defineProperty(c.s$.prototype, "layer", { get: function() { return this.parentLayer }, set: function(t) { this.parentLayer = t, this.Ln = t } }) } }, 7554: () => {}, 380: (t, i, n) => { "use strict"; n.d(i, { ol: () => e, kc: () => f, fL: () => a }); const s = class { static getSpinResponse() { const t = [{ mysSymInfo: { mysIdx: [], hMysIdx: [] }, megaSymbol: [ [{ s: 4, r: 5, f: 0, m: 0 }, { s: 3, r: 5, f: 0, m: 0 }, { s: 9, r: 5, f: 0, m: 0 }, { s: 10, r: 5, f: 0, m: 0 }, { s: 11, r: 5, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 7, r: 5, f: 0, m: 0 }, { s: 10, r: 5, f: 0, m: 0 }, { s: 11, r: 5, f: 0, m: 0 }, { s: 2, r: 5, f: 0, m: 0 }, { s: 9, r: 5, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 6, r: 4, f: 0, m: 0 }, { s: 9, r: 4, f: 0, m: 0 }, { s: 4, r: 4, f: 0, m: 0 }, { s: 3, r: 4, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 11, r: 2, f: 0, m: 0 }, { s: 10, r: 2, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 11, r: 2, f: 0, m: 0 }, { s: 8, r: 2, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 4, r: 3, f: 0, m: 0 }, { s: 3, r: 3, f: 0, m: 0 }, { s: 9, r: 3, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }] ], megaHSymbol: [{ s: 0, r: 5, f: 0, m: 0 }, { s: 13, r: 5, f: 0, m: 0 }, { s: 13, r: 5, f: 0, m: 0 }, { s: 13, r: 5, f: 0, m: 0 }, { s: 11, r: 5, f: 0, m: 0 }, { s: 0, r: 5, f: 0, m: 0 }], roundId: 30463, freeGame: { priority: 1, fgTotalGain: 12, respinGame: { priority: 2, buyFeature: 0, accmWin: .06, respinReq: 1, topRow: [3, 7, 9, 8, 7, 3], symPos: [2, 9, 11], maxWays: 4050, nextSymbol: [ [{ s: 99, r: 5, f: 0, m: 0 }, { s: 4, r: 5, f: 0, m: 0 }, { s: 3, r: 5, f: 0, m: 0 }, { s: 10, r: 5, f: 0, m: 0 }, { s: 11, r: 5, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 99, r: 5, f: 0, m: 0 }, { s: 7, r: 5, f: 0, m: 0 }, { s: 10, r: 5, f: 0, m: 0 }, { s: 11, r: 5, f: 0, m: 0 }, { s: 2, r: 5, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 99, r: 4, f: 0, m: 0 }, { s: 6, r: 4, f: 0, m: 0 }, { s: 4, r: 4, f: 0, m: 0 }, { s: 3, r: 4, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 11, r: 2, f: 0, m: 0 }, { s: 10, r: 2, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 11, r: 2, f: 0, m: 0 }, { s: 8, r: 2, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 4, r: 3, f: 0, m: 0 }, { s: 3, r: 3, f: 0, m: 0 }, { s: 9, r: 3, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }] ], hnextSymbol: [{ s: 0, r: 5, f: 0, m: 0 }, { s: 13, r: 5, f: 0, m: 0 }, { s: 13, r: 5, f: 0, m: 0 }, { s: 13, r: 5, f: 0, m: 0 }, { s: 11, r: 5, f: 0, m: 0 }, { s: 0, r: 5, f: 0, m: 0 }], hPos: [], multiplier: 2 }, spins: 10, currSpin: 2 }, fgRemainGame: 10, boxes: [], wayWins: [{ mul: 0, wildWin: [], side: "L", ways: 1, hWildWin: [], h: [], type: "N", symbol: 9, win: .06, hits: 3, box: [2, 9, 11], wilds: 0 }], featureResults: { buyFeature: 0, accmWin: .06, multiplierList: { multiplier: 2, win: .06 }, boxes: [], sMeterState: 0, maxWays: 4050, hBoxes: [4, 3, 2] }, wildWins: [], balance: 20007.32, totalWin: .06, tnum: 72263, successBet: 0, code: 0, serialNo: "2022-12-01T09:03:33.454Z,0.8951617601716271" }, { mysSymInfo: { mysIdx: [], hMysIdx: [] }, megaSymbol: [ [{ s: 8, r: 5, f: 0, m: 0 }, { s: 4, r: 5, f: 0, m: 0 }, { s: 3, r: 5, f: 0, m: 0 }, { s: 10, r: 5, f: 0, m: 0 }, { s: 11, r: 5, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 6, r: 5, f: 0, m: 0 }, { s: 7, r: 5, f: 0, m: 0 }, { s: 10, r: 5, f: 0, m: 0 }, { s: 11, r: 5, f: 0, m: 0 }, { s: 2, r: 5, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 8, r: 4, f: 0, m: 0 }, { s: 6, r: 4, f: 0, m: 0 }, { s: 4, r: 4, f: 0, m: 0 }, { s: 3, r: 4, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 11, r: 2, f: 0, m: 0 }, { s: 10, r: 2, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 11, r: 2, f: 0, m: 0 }, { s: 8, r: 2, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 4, r: 3, f: 0, m: 0 }, { s: 3, r: 3, f: 0, m: 0 }, { s: 9, r: 3, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }] ], megaHSymbol: [{ s: 0, r: 5, f: 0, m: 0 }, { s: 13, r: 5, f: 0, m: 0 }, { s: 13, r: 5, f: 0, m: 0 }, { s: 13, r: 5, f: 0, m: 0 }, { s: 11, r: 5, f: 0, m: 0 }, { s: 0, r: 5, f: 0, m: 0 }], roundId: 30466, symbolWins: [{ type: "S", symbol: 13, win: 0, hits: 3, hBox: [4, 3, 2], wilds: 0, sides: "A" }], freeGame: { priority: 1, fgTotalGain: 17, respinGame: { buyFeature: 0, respinReq: 0, maxWays: 4050, multiplier: 2 }, spins: 15, currSpin: 2 }, fgRemainGame: 15, boxes: [], wayWins: [], featureResults: { buyFeature: 0, accmWin: .06, multiplierList: { multiplier: 2, win: 0 }, boxes: [], sMeterState: 0, maxWays: 4050, hBoxes: [4, 3, 2] }, wildWins: [], balance: 20007.32, totalWin: 0, tnum: 72266, successBet: 0, code: 0, serialNo: "2022-12-01T09:03:35.706Z,0.960091611515761" }]; - 1 === s.Ll ? s.Ll = 0 : (s.Ll++, s.Ll >= t.length && (s.Ll = 0)); const i = t[s.Ll]; return s.formatHorizontalAttribute(i), JSON.stringify(i, null, 2), i } static formatHorizontalAttribute(t) { const i = t.megaHSymbol; let n = [...i]; for (let t = 0; t < i.length; t++) { if (0 !== i[t].s) break } n = n.filter((t => t.s > 0)); const s = (t, i) => { for (let n = 0; n < t.length; n++) t[n] = t[n] - i; return t }; let e = t.respinGame && t.respinGame.hPos || []; e = s(e, 0), e.length && (t.respinGame.hPos = e); let r = t.freeGame && t.freeGame.respinGame && t.freeGame.respinGame.hPos || []; r = s(r, 0), r.length && (t.freeGame.respinGame.hPos = r); (t && t.wayWins || []).forEach((t => { t && t.h && (t.h = s(t.h, 0)) })); (t && t.symbolWins || []).forEach((t => { t && t.hBox && (t.hBox = s(t.hBox, 0)) })); const h = t.megaSymbol; h.forEach(((t, i) => { h[i] = t.filter((t => t.s > 0)) })), t.symbol = h } static getResumeLastSymbolsOnReel(t, i, n, s, e) { let r = []; r = i ? t.slice(0, s) : t.slice(s + n * e, s + n * e + e), r = r.filter((t => t.s > 0)), i && (r = r.reverse()); for (let t = 0; t < r.length; t++) 0 !== r[t].r && (r[t].r += 1); return r } }; let e = s; e.Ll = -1; var r = n(4665), h = n(589); class o { constructor() { this.Cl = { key: null, iv: null } } Ul() { return !!this.Cl.key } kl(t) { return t && t.length ? decodeURIComponent(t.replace(/\s+/g, "").replace(/[0-9a-f]{2}/g, "%$&")) : "" } encrypt(t) { if (!this.Ul()) throw new Error("CryptoCipher is not initialized, cannot encrypt"); const i = h.AES.encrypt(t, this.Cl.key, { iv: this.Cl.iv }); return h.enc.Base64.stringify(i.ciphertext) } setupCipherCredentials(t, i) { this.Cl.iv = h.enc.Hex.parse(i), this.Cl.key = h.enc.Hex.parse(t) } decrypt(t) { if (!this.Ul()) return t; const i = h.AES.decrypt(t, this.Cl.key, { iv: this.Cl.iv }); return this.kl(i.toString()) } } const u = class { constructor() { if (this.Fl = null, this.Bl = !1, this.Dl = {}, this.Gl = null, this.Wl = null, this.Hl = null, this.Xl = null, this.Vl = null, u.Wu) throw new Error("Error: Instantiation failed: Use SocketNetworkManager.getInst() instead of new."); u.Wu = this } get token() { return this.Gl } get sessionId() { return this.Wl } static getInst() { return u.Wu } connect(t, i, n) { return this.initConnection(t, i, n) } /* initConnection(t, i, n) { return this.Fl = new WebSocket(t), this.Bl = i, this.Fl.onmessage = t => { let i = t.data; this.Xl && (i = this.Xl.decrypt(t.data)); const n = Number(i.substr(0, i.indexOf("."))), s = i.substr(i.indexOf(".") + 1), e = this.Dl[n] || []; if (n === u.COMMAND.RETRIEVE_SECURITY_KEY) { const t = s.split("|"); return void(t.length > 2 && (this.Xl.setupCipherCredentials(t[0], t[1]), e.forEach((t => t(null))))) } const r = JSON.parse(s); e.forEach((t => t(r))), n === u.COMMAND.LOGIN && (this.Gl = r.token, this.Wl = r.sessionId), n === u.COMMAND.SESSION_EXPIRED && clearInterval(this.Vl) }, this.Fl.onerror = t => {}, this.Fl.onclose = t => { n && n() }, new Promise(((t, i) => { this.Fl.onopen = i => { this.$l(), t() } })) } */ // START: New code for PHP backend initConnection(t, i, n) { // This object will simulate the WebSocket for the rest of the game's code. const mockSocket = { onmessage: () => {}, // Placeholder for the game's message handler onerror: () => {}, // Placeholder for error handler onclose: () => {}, // Placeholder for close handler onopen: () => {} // Placeholder for open handler }; this.Fl = mockSocket; this.Bl = false; // We are not using encryption for this REST API version. const API_ENDPOINT = 'https://app.casinokaki.com/api.php'; // This function replaces the original socket.send() this.sendRequest = (command, data, isSecure = false) => { const formData = new FormData(); // The command (e.g., 1001 for LOGIN) becomes our 'action' formData.append('action', command); // Add all data properties to the form if (data) { for (const key in data) { formData.append(key, data[key]); } } fetch(API_ENDPOINT, { method: 'POST', body: formData, }) .then(response => { if (!response.ok) { throw new Error('Network response was not ok'); } return response.json(); }) .then(responseData => { // The game expects the onmessage event to have a `data` property // which is a string. So we format our response to look like it. // Example: "0.{"code":0,"balance":10000,...}" const responseString = `${responseData.code || 0}.${JSON.stringify(responseData)}`; // Trigger the game's original onmessage handler if (mockSocket.onmessage) { mockSocket.onmessage({ data: responseString }); } }) .catch(error => { console.error('API Error:', error); if (mockSocket.onerror) { mockSocket.onerror(error); } }); }; // We need to override the original sendRequest function that was trying to use socket.send() // Find the part of the code that looks like `sendRequest(t,i,n=!0,s=!1){...}` // and replace its content to call our new fetch-based function. // It's already part of the larger class structure, so we just assign it. const originalSendRequest = this.sendRequest; // Keep a reference if needed, just in case. this.sendRequest = (command, data, isSecure, isForced) => { // Extract the command number from the incoming string like "1001.{...}" const commandParts = command.split('.'); const commandNum = commandParts[0]; const dataString = commandParts.length > 1 ? commandParts.slice(1).join('.') : '{}'; let parsedData = data; if (!parsedData && dataString) { try { parsedData = JSON.parse(dataString); } catch (e) { // Ignore if it's not valid JSON } } // This is the new logic, calling our fetch-based sender const formData = new FormData(); formData.append('action', commandNum.toLowerCase()); // e.g., 'login', 'spin' // Add properties from the parsed data if(parsedData) { for(const key in parsedData) { formData.append(key, parsedData[key]); } } fetch(API_ENDPOINT, { method: 'POST', body: formData, }) .then(response => response.json()) .then(responseData => { if (mockSocket.onmessage) { // The original onmessage handler expects a certain format. // We need to re-create it: `CODE.JSON_STRING` let responseCode = responseData.code; // Remap login success to the original code if needed by the game logic if (commandNum === '1001' && responseData.code === 0) { // The game seems to handle login response differently, let's pass it directly. } const responseString = `${commandNum}.${JSON.stringify(responseData)}`; mockSocket.onmessage({ data: responseString }); } }) .catch(error => { console.error('Error in sendRequest:', error); if (mockSocket.onerror) { mockSocket.onerror(error); } }); }; // Since this is not a real socket, we "open" it immediately. return new Promise((resolve) => { setTimeout(() => { if (mockSocket.onopen) { mockSocket.onopen(); } this.$l(); // This calls the original game's keep-alive function resolve(); }, 100); }); } // END: New code for PHP backend // START: New replacement code for PHP backend sendRequest(t, i, n = true, s = false) { const API_ENDPOINT = 'https://app.casinokaki.com/api.php'; // The game sends the command and data combined in the first argument 't'. // Example: '1001.{"username":"test"}' or '4113.{"totalBet":0.5}' const commandParts = t.split('.'); const commandNum = commandParts[0]; const dataString = commandParts.length > 1 ? commandParts.slice(1).join('.') : '{}'; let requestData = {}; try { requestData = JSON.parse(dataString); } catch (e) { // Ignore if data is not valid JSON } // The second argument 'i' might also contain data. Merge them. if (i && typeof i === 'object') { Object.assign(requestData, i); } // Map command numbers to human-readable actions for our PHP script. let action = ''; switch(commandNum) { case '1001': action = 'login'; break; case '4113': action = 'spin'; break; // We can add more command mappings here later if needed. default: action = commandNum; } // Prepare the data for a POST request. const formData = new FormData(); formData.append('action', action); // Add all properties from our request data to the form. for (const key in requestData) { formData.append(key, requestData[key]); } const promise = new Promise((resolve, reject) => { fetch(API_ENDPOINT, { method: 'POST', body: formData, }) .then(response => { if (!response.ok) { throw new Error(`HTTP error! Status: ${response.status}`); } return response.json(); }) .then(responseData => { // The game's internal `onmessage` handler expects a specific string format: // COMMAND_CODE + "." + JSON_STRING // We must replicate this format exactly. const responseString = `${commandNum}.${JSON.stringify(responseData)}`; // Simulate the WebSocket message event. `this.Fl` is our mock socket from the previous step. if (this.Fl && this.Fl.onmessage) { this.Fl.onmessage({ data: responseString }); } resolve(responseData); }) .catch(error => { console.error(`Error sending request for action '${action}':`, error); if (this.Fl && this.Fl.onerror) { this.Fl.onerror(error); } reject(error); }); }); // The original function returned a promise if the third argument 'n' was true. return n ? promise : Promise.resolve(); } // END: New replacement code subscribe(t, i) { const n = this.Dl[t]; return n ? n.push(i) : this.Dl[t] = [i], () => { this.Dl[t] = this.Dl[t].filter((t => t !== i)) } } $l(t = 30) { this.Vl && clearInterval(this.Vl), this.Vl = setInterval(this.Yl, 1e3 * t) } Yl(t) { const i = { sessionId: f.getInst().loginInfo.sessionId, clientVersion: "" }; u.getInst().sendRequest(u.COMMAND.KEEP_ALIVE, i).then((t => {})).catch((t => { clearInterval(this.Vl) })) } tryLoadCredentialOnWeb() { const t = r.cQ.parseURLParams(window.location.href), { sid: i, token: n, acctId: s } = t; return { sessionId: i, token: n, acctId: s } } }; let a = u; a.Wu = new u, (t => { let i; var n; (n = i = t.COMMAND || (t.COMMAND = {}))[n.RETRIEVE_SECURITY_KEY = 99999] = "RETRIEVE_SECURITY_KEY", n[n.LOGIN = 1001] = "LOGIN", n[n.SESSION_EXPIRED = -1] = "SESSION_EXPIRED", n[n.KEEP_ALIVE = 6] = "KEEP_ALIVE" })(a || (a = {})); var l = n(204); const c = class { constructor() { this.zl = null, this.sessionExpired = !1, this.Kl = null, this.ql = 0, this.Zl = null, this.Jl = 0, this.tc = null, this.currentAmount = null, this.ic = !1, this.zl = new b, this.nc(), this.sc() } static getInst() { return c.Wu || (c.Wu = new c), c.Wu } socketRequest() { return this.zl } reset() { this.Kl = null, this.tc = null, this.Zl = 1 } get selectedBetLine() { return this.Kl || this.gameInfo && this.gameInfo.setting && this.gameInfo.setting.defaultLineBet } get betLineOptions() { return this.gameInfo && this.gameInfo.setting.lineBet || [] } get unit() { return this.selectedDenomination * this.selectedBetLine } get totalBet() { return this.ec ? this.credit * this.unit : this.credit * this.unit * this.line } get wayWins() { return c.getInst().spinInfo && c.getInst().spinInfo.wayWins || [] } get credit() { return this.Zl || this.gameInfo && this.gameInfo.resumeCredit || this.ec || 1 } get ec() { return this.gameInfo && this.gameInfo.setting && this.gameInfo.setting.waysCredit.length && this.gameInfo.setting.waysCredit[0] } get currentBetMultiplier() { return 1 * (this.selectedDenomination / this.minimumDenom) } get gameInfo() { return this.rc } get resumeGameStartLastSymbols() { return this.gameInfo.freeGame && this.gameInfo.freeGame.respinGame && this.gameInfo.freeGame.respinGame.lastSymbol || this.gameInfo.respinGame && this.gameInfo.respinGame.lastSymbol || this.rc.resumeLastSymbols } get resumeLastMegaSymbol() { return this.gameInfo && this.gameInfo.resumeLastMegaSymbol || [] } get loginInfo() { return this.hc } get spinInfo() { return this.oc } set spinInfo(t) { this.oc = t, this.hc.acct.balance = t.balance } get line() { return this.uc } set line(t) { this.uc = t } get currentWinIfAny() { return this.oc && this.oc.totalWin || 0 } get jackpotPoolsInfo() { return this.ac } get jackpotPoolsUpdateInfo() { return this.lc } set jackpotPoolsInfo(t) { this.ac = t } set jackpotPoolsUpdateInfo(t) { this.lc = t } get lastWinAmountIfAny() { return this.Jl } get creditExchangeRate() { return this.minimumDenom } get cc() { return this.gameInfo && this.gameInfo.setting.domination } get selectedDenomination() { return this.tc || this.gameInfo && this.gameInfo.resumeDomination || this.gameInfo && this.gameInfo.setting && this.gameInfo.setting.defaultDomination } get defaultDomination() { return this.gameInfo && this.gameInfo.setting && this.gameInfo.setting.defaultDomination } canIncreaseDenomination() { return this.cc.indexOf(this.selectedDenomination) < this.cc.length - 1 } canDecreaseDenomination() { return this.cc.indexOf(this.selectedDenomination) > 0 } increaseDenomination() { if (this.canIncreaseDenomination()) { const t = this.cc.indexOf(this.selectedDenomination); this.tc = this.cc[t + 1], this.fc() } } increaseDenominationScroll(t) { this.tc = this.cc[t], this.fc() } decreaseDenomination() { if (this.canDecreaseDenomination()) { const t = this.cc.indexOf(this.selectedDenomination); this.tc = this.cc[t - 1], this.fc() } } resetDenominationToDefault() { this.tc = this.defaultDomination, this.fc() } setDenomination(t) { this.tc = t, this.fc() } getDenominationAmount(t) { return this.credit * t * this.line } notifyTotalBetLinesChanged() { this.fc() } increaseBetLine() { let t = this.betLineOptions.indexOf(this.selectedBetLine) + 1; t === this.betLineOptions.length && (t = 0), this.Kl = this.betLineOptions[t], this.vc() } useBalance(t) { this.loginInfo.acct.balance = Math.max(0, this.loginInfo.acct.balance - t), this.dc(this.loginInfo.acct.balance) } cleanSpinInfo() { this.Jl = this.oc && this.oc.totalWin || 0, this.oc = null, this._c() } cleanGameInfo() { delete this.gameInfo.fgRemainAccumReward, this.gameInfo.freeGame && (this.gameInfo.freeGame.spins = 0), delete this.rc.resumeLastSymbols } cleanupSpinInfo() { this.oc && (this.oc.lineWins = [], this.oc.symbolWins = [], this.oc.wayWins = []) } getWinLineData() { if (!c.getInst().spinInfo) return []; let t = c.getInst().spinInfo.lineWins; return c.getInst().spinInfo.symbolWins && (t = (t || []).concat(c.getInst().spinInfo.symbolWins)), c.getInst().spinInfo.wayWins && (t = (t || []).concat(c.getInst().spinInfo.wayWins)), t } getScatterWinData() { let t = null; if (c.getInst().spinInfo.symbolWins) for (const i in c.getInst().spinInfo.symbolWins) if ("S" == c.getInst().spinInfo.symbolWins[i].type) { t = c.getInst().spinInfo.symbolWins[i]; break } if (c.getInst().spinInfo.lineWins) for (const i in c.getInst().spinInfo.lineWins) if ("S" == c.getInst().spinInfo.lineWins[i].type) { t = c.getInst().spinInfo.lineWins[i]; break } return t } get balance() { return this.loginInfo && this.loginInfo.acct && this.loginInfo.acct.balance || 0 } get currencyCode() { return this.loginInfo && this.loginInfo.acct && this.loginInfo.acct.currency || "" } get currencySign() { return l.ConfigManager.getInst().currencyList[c.getInst().currencyCode] || "$" } get playerName() { return this.loginInfo && this.loginInfo.acct && this.loginInfo.acct.acctName || "" } get freeSpin() { return this.ql } set freeSpin(t) { this.ql = t } get minimumDenom() { return this.cc && this.cc[0] || .1 } get tnum() { var t; return null == (t = this.spinInfo) ? void 0 : t.tnum } start() {} nc() { a.getInst().subscribe(b.COMMAND.BALANCE_TOPUP, (t => { const i = parseFloat(t && t.acct && t.acct.balance); isNaN(i) ? JSON.stringify(t) : (this.loginInfo.acct.balance = Math.max(0, this.loginInfo.acct.balance + i), this.dc(this.loginInfo.acct.balance)) })) } sc() { this.jackpotPoolsInfo = { gameCode: "sRomaII", jackpotName: "Roma Dummy Jackpot", jackpotDesc: "Roma Jackpot Testing Only", jackpotPoolsInfos: [{ type: "rand_mul", level: 1, max: 25, min: 10, category: "1", isSync: !0, rateUp: 0, currentAmount: 17 }, { type: "rand_mul", level: 2, max: 75, min: 25, category: "2", isSync: !0, rateUp: 0, currentAmount: 57 }, { type: "rand_mul", level: 3, max: 200, min: 75, category: "3", isSync: !0, rateUp: 0, currentAmount: 131 }, { type: "rand_mul", level: 4, max: 1e3, min: 200, category: "4", isSync: !0, rateUp: 0, currentAmount: 251 }] }, a.getInst().subscribe(b.COMMAND.JACKPOT_INFO, (t => { this.jackpotPoolsInfo = t })), a.getInst().subscribe(b.COMMAND.JACKPOT_UPDATE, (t => { this.jackpotPoolsUpdateInfo = t })) } login() { return this.zl.login().then((t => { if (!(t.code > 0)) return this.hc = t, this.dc(this.loginInfo.acct.balance), this.fc(), t; this.sessionExpired = 7 === t.code })) } mockLogin(t) { this.hc = t, this.dc(this.loginInfo.acct.balance), this.fc() } mockSpin(t) { this.oc = t } setFeatureGame(t) { this.spinInfo ? (this.spinInfo.freeGame || (this.spinInfo.freeGame = {}), this.spinInfo.freeGame = t.freeGame, this.spinInfo.freeGame.fgTotalGain = t.freeGame.spins, this.spinInfo.featureGame = t.featureGame) : this.gameInfo && (this.gameInfo.freeGame = t.freeGame, this.gameInfo.freeGame.fgTotalGain = t.freeGame.spins) } requestGameSettings() { const t = { gameCode: l.ConfigManager.getInst().gameCode, sessionId: this.loginInfo.sessionId, language: l.MainApp.getInst().language }; return a.getInst().sendRequest(b.COMMAND.START_GAME, t).then((t => (this.rc = t, JSON.stringify(t), this.ic && t.unfinishedGames && !("redirect" in t.unfinishedGames) && !("skip" in t.unfinishedGames) && (this.rc.unfinishedGames.redirect = !0, this.rc.unfinishedGames.skip = !0), this.ic && !t.resumeLastSymbols && (this.rc.resumeLastSymbols = [8, 9, 10, 11, 12, 8, 9, 10, 11, 12, 8, 9, 10, 11, 12]), t.resumeLineBet && t.resumeDomination && (this.Kl = t.resumeLineBet / t.resumeDomination), this.uc = this.gameInfo && this.gameInfo.resumeLine || this.gameInfo.setting.line || 1, this.rc))) } spinGameRequest(t, i, n, s) { return this.zl.spinGameRequest(t, i, n, s) } spinLineGameRequest(t, i, n, s) { return this.zl.spinLineGameRequest(t, i, n, s) } spinFinished() {} _c() {} dc(t) {} fc() {} vc() {} }; let f = c; f.Wu = null; var v = Object.defineProperty, d = Object.getOwnPropertySymbols, _ = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable, m = (t, i, n) => i in t ? v(t, i, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[i] = n; class b { constructor() { this.mc = !1, this.bc = !1, this.wc = !1, this.gc = !1, this.yc = -1, this.Ec = [{ symbols: [4, 9, 7, 11, 11, 10, 5, 10, 2, 2, 4, 1, 3, 9, 9], totalWin: .4 }, { symbols: [4, 7, 11, 6, 6, 10, 8, 6, 12, 11, 4, 7, 11, 11, 2], totalWin: .3 }, { symbols: [8, 8, 1, 5, 7, 7, 7, 8, 1, 8, 8, 8, 7, 9, 7], totalWin: .28 }, { symbols: [7, 7, 8, 1, 10, 8, 8, 7, 9, 4, 7, 7, 8, 7, 10], totalWin: 0 }, { symbols: [4, 8, 7, 6, 8, 10, 7, 8, 11, 7, 4, 8, 7, 6, 8], totalWin: 10.5 }, { symbols: [3, 8, 4, 6, 9, 10, 7, 10, 11, 5, 4, 8, 4, 2, 9], totalWin: 1 }], this.Sc = 0, this.Ac = [{ megaSymbol: [ [{ s: 5, r: 4, f: 0, m: 0 }, { s: 8, r: 4, f: 0, m: 0 }, { s: 3, r: 4, f: 0, m: 0 }, { s: 6, r: 4, f: 0, m: 0 }, { s: 8, r: 4, f: 0, m: 0 }], [{ s: 7, r: 3, f: 0, m: 0 }, { s: 3, r: 4, f: 0, m: 0 }, { s: 8, r: 3, f: 1, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 9, r: 1, f: 1, m: 0 }, { s: 6, r: 4, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 10, r: 2, f: 1, m: 0 }, { s: 9, r: 3, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 11, r: 3, f: 1, m: 0 }, { s: 10, r: 4, f: 0, m: 0 }, { s: 6, r: 4, f: 0, m: 0 }, { s: 11, r: 4, f: 0, m: 0 }, { s: 0, r: 0, f: 0, m: 0 }], [{ s: 5, r: 4, f: 0, m: 0 }, { s: 9, r: 4, f: 0, m: 0 }, { s: 3, r: 4, f: 0, m: 0 }, { s: 7, r: 4, f: 0, m: 0 }, { s: 12, r: 4, f: 0, m: 0 }] ], megaHSymbol: [{ s: 0, r: 4, f: 0, m: 0 }, { s: 11, r: 4, f: 0, m: 0 }, { s: 4, r: 4, f: 0, m: 0 }, { s: 10, r: 4, f: 0, m: 0 }, { s: 11, r: 4, f: 0, m: 0 }, { s: 0, r: 4, f: 0, m: 0 }], roundId: 0, fgRemainGame: 0, wayWins: [], featureResults: { buyFeature: 0, multiplierList: { multiplier: 1, win: 0 }, sMeterState: 0, maxWays: 4500 }, wildWins: [], balance: 199999.5, totalWin: 0, tnum: 356164, successBet: .5, code: 0, serialNo: "2022-01-27T10:40:53.648Z,0.11139497476502958" }], this.Tc = [{ symbol: [8, 11, 8, 12, 4, 8, 5, 8, 5, 11, 5, 12, 12, 10, 11, 10, 10, 5, 3, 2], roundId: 19493, fgRemainGame: 8, symbolWins: [{ type: "S", symbol: 12, multiplier: 1, hits: 3, win: 2.4, box: [3, 11, 12], wilds: 0, wildWin: [] }], freeGame: { remainingCount: 0, spins: 8, fgTotalGain: 8, currSpin: 0, multiples: 1, currMutiply: 1, activeIndex: [3, 11, 12] }, wayWins: [], featureResults: { multiplierList: { multiplier: 1, win: 2.4 } }, wildWins: [], balance: 199991.6, totalWin: .4, tnum: 508797, successBet: .8, code: 0, serialNo: "2021-03-21T18:33:08.531Z,0.5416520853889624" }, { symbol: [2, 5, 3, 8, 3, 3, 11, 9, 1, 7, 8, 11, 9, 1, 7, 8, 1, 1, 11, 4], roundId: 19494, fgRemainGame: 7, lineWins: [{ line: 4, multiplier: 1, wildWin: [16, 17], side: "L", type: "N", symbol: 8, hits: 3, win: .1, wilds: 0 }, { line: 10, multiplier: 1, wildWin: [16, 17], side: "L", type: "N", symbol: 8, hits: 3, win: .1, wilds: 0 }, { line: 32, multiplier: 1, wildWin: [16, 17, 13], side: "L", type: "N", symbol: 8, hits: 4, win: .6, wilds: 0 }, { line: 34, multiplier: 1, wildWin: [16, 17, 13], side: "L", type: "N", symbol: 8, hits: 4, win: .6, wilds: 0 }], freeGame: { remainingCount: 0, spins: 7, fgTotalGain: 8, currSpin: 1, multiples: 1, currMutiply: 1 }, wayWins: [], featureResults: { multiplierList: { multiplier: 1, win: 1.4 } }, wildWins: [13, 16, 17], balance: 199993, totalWin: 1.4, tnum: 508798, successBet: 0, code: 0, serialNo: "2021-03-21T18:33:27.098Z,0.9142165384723897" }, { symbol: [6, 2, 7, 4, 1, 6, 10, 7, 7, 1, 2, 10, 1, 12, 1, 10, 1, 1, 2, 4], roundId: 19495, fgRemainGame: 6, lineWins: [{ line: 4, multiplier: 1, wildWin: [16, 17], side: "L", type: "N", symbol: 10, hits: 3, win: .1, wilds: 0 }, { line: 8, multiplier: 1, wildWin: [16, 12], side: "L", type: "N", symbol: 10, hits: 3, win: .1, wilds: 0 }, { line: 10, multiplier: 1, wildWin: [16, 17, 14], side: "L", type: "N", symbol: 2, hits: 5, win: 8, wilds: 0 }, { line: 14, multiplier: 1, wildWin: [16, 12], side: "L", type: "N", symbol: 2, hits: 3, win: .6, wilds: 0 }, { line: 16, multiplier: 1, wildWin: [17], side: "L", type: "N", symbol: 10, hits: 3, win: .1, wilds: 0 }, { line: 20, multiplier: 1, wildWin: [12], side: "L", type: "N", symbol: 10, hits: 3, win: .1, wilds: 0 }, { line: 28, multiplier: 1, wildWin: [16, 12], side: "L", type: "N", symbol: 10, hits: 3, win: .1, wilds: 0 }, { line: 32, multiplier: 1, wildWin: [16, 17], side: "L", type: "N", symbol: 10, hits: 3, win: .1, wilds: 0 }, { line: 34, multiplier: 1, wildWin: [16, 17], side: "L", type: "N", symbol: 2, hits: 3, win: .6, wilds: 0 }, { line: 36, multiplier: 1, wildWin: [12], side: "L", type: "N", symbol: 10, hits: 3, win: .1, wilds: 0 }, { line: 38, multiplier: 1, wildWin: [16, 12], side: "L", type: "N", symbol: 2, hits: 3, win: .6, wilds: 0 }], freeGame: { remainingCount: 0, spins: 6, fgTotalGain: 8, currSpin: 2, multiples: 1, currMutiply: 1 }, wayWins: [], featureResults: { multiplierList: { multiplier: 1, win: 10.5 } }, wildWins: [12, 14, 16, 17], balance: 200003.5, totalWin: 10.5, tnum: 508799, successBet: 0, code: 0, serialNo: "2021-03-21T18:33:39.667Z,0.19243116745150957" }, { symbol: [4, 11, 2, 11, 3, 6, 11, 3, 11, 8, 6, 1, 8, 1, 8, 2, 6, 8, 6, 4], roundId: 19496, fgRemainGame: 5, freeGame: { remainingCount: 0, spins: 5, fgTotalGain: 8, currSpin: 3, multiples: 1, currMutiply: 1 }, wayWins: [], featureResults: { multiplierList: { multiplier: 1, win: 0 } }, wildWins: [], balance: 200003.5, totalWin: 0, tnum: 508800, successBet: 0, code: 0, serialNo: "2021-03-21T18:33:42.397Z,0.3169648562671201" }, { symbol: [1, 1, 7, 9, 6, 1, 1, 1, 3, 2, 1, 4, 1, 7, 10, 4, 6, 8, 7, 7], roundId: 19497, fgRemainGame: 4, lineWins: [{ line: 1, multiplier: 1, wildWin: [5, 6, 7], side: "L", type: "N", symbol: 3, hits: 4, win: 1.4, wilds: 0 }, { line: 2, multiplier: 1, wildWin: [10, 12], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 3, multiplier: 1, wildWin: [0, 1], side: "L", type: "N", symbol: 7, hits: 3, win: .2, wilds: 0 }, { line: 6, multiplier: 1, wildWin: [10, 6], side: "L", type: "N", symbol: 7, hits: 3, win: .2, wilds: 0 }, { line: 7, multiplier: 1, wildWin: [0, 1, 7], side: "L", type: "N", symbol: 7, hits: 5, win: 3, wilds: 0 }, { line: 9, multiplier: 1, wildWin: [5, 1], side: "L", type: "N", symbol: 7, hits: 3, win: .2, wilds: 0 }, { line: 11, multiplier: 1, wildWin: [0, 6, 12], side: "L", type: "N", symbol: 7, hits: 5, win: 3, wilds: 0 }, { line: 12, multiplier: 1, wildWin: [7], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 13, multiplier: 1, wildWin: [5, 1, 7], side: "L", type: "N", symbol: 7, hits: 4, win: 1, wilds: 0 }, { line: 14, multiplier: 1, wildWin: [10, 12], side: "L", type: "N", symbol: 6, hits: 3, win: .2, wilds: 0 }, { line: 15, multiplier: 1, wildWin: [0, 6], side: "L", type: "N", symbol: 7, hits: 3, win: .2, wilds: 0 }, { line: 17, multiplier: 1, wildWin: [5, 7], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 18, multiplier: 1, wildWin: [10, 6, 12], side: "L", type: "N", symbol: 7, hits: 4, win: 1, wilds: 0 }, { line: 19, multiplier: 1, wildWin: [0, 6, 7], side: "L", type: "N", symbol: 3, hits: 4, win: 1.4, wilds: 0 }, { line: 20, multiplier: 1, wildWin: [12], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 21, multiplier: 1, wildWin: [5, 6, 12], side: "L", type: "N", symbol: 7, hits: 5, win: 3, wilds: 0 }, { line: 22, multiplier: 1, wildWin: [10, 7], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 23, multiplier: 1, wildWin: [5, 6], side: "L", type: "N", symbol: 7, hits: 3, win: .2, wilds: 0 }, { line: 25, multiplier: 1, wildWin: [5, 12], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 26, multiplier: 1, wildWin: [10, 6, 7], side: "L", type: "N", symbol: 3, hits: 4, win: 1.4, wilds: 0 }, { line: 27, multiplier: 1, wildWin: [0, 1, 7], side: "L", type: "N", symbol: 1, hits: 3, win: 1, wilds: 0 }, { line: 29, multiplier: 1, wildWin: [0, 6, 12], side: "L", type: "N", symbol: 7, hits: 5, win: 3, wilds: 0 }, { line: 30, multiplier: 1, wildWin: [7], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 31, multiplier: 1, wildWin: [0, 1], side: "L", type: "N", symbol: 7, hits: 3, win: .2, wilds: 0 }, { line: 33, multiplier: 1, wildWin: [5, 1], side: "L", type: "N", symbol: 7, hits: 3, win: .2, wilds: 0 }, { line: 35, multiplier: 1, wildWin: [0, 6, 7], side: "L", type: "N", symbol: 7, hits: 4, win: 1, wilds: 0 }, { line: 36, multiplier: 1, wildWin: [12], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 37, multiplier: 1, wildWin: [5, 1, 7], side: "L", type: "N", symbol: 7, hits: 4, win: 1, wilds: 0 }, { line: 38, multiplier: 1, wildWin: [10, 12], side: "L", type: "N", symbol: 6, hits: 3, win: .2, wilds: 0 }, { line: 39, multiplier: 1, wildWin: [0, 6, 12], side: "L", type: "N", symbol: 7, hits: 4, win: 1, wilds: 0 }, { line: 40, multiplier: 1, wildWin: [7], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }], freeGame: { remainingCount: 0, spins: 4, fgTotalGain: 8, currSpin: 4, multiples: 1, currMutiply: 1 }, wayWins: [], featureResults: { multiplierList: { multiplier: 1, win: 26.7 } }, wildWins: [0, 1, 5, 6, 7, 10, 12], balance: 200030.2, totalWin: 26.7, tnum: 508801, successBet: 0, code: 0, serialNo: "2021-03-21T18:33:44.448Z,0.4722663519121353" }, { symbol: [2, 12, 10, 2, 4, 3, 5, 10, 10, 6, 8, 3, 1, 10, 1, 8, 9, 1, 1, 11], roundId: 19498, fgRemainGame: 3, lineWins: [{ line: 5, multiplier: 1, wildWin: [17], side: "L", type: "N", symbol: 3, hits: 3, win: .3, wilds: 0 }, { line: 25, multiplier: 1, wildWin: [12], side: "L", type: "N", symbol: 3, hits: 3, win: .3, wilds: 0 }], freeGame: { remainingCount: 0, spins: 3, fgTotalGain: 8, currSpin: 5, multiples: 1, currMutiply: 1 }, wayWins: [], featureResults: { multiplierList: { multiplier: 1, win: .6 } }, wildWins: [12, 17], balance: 200030.8, totalWin: .6, tnum: 508802, successBet: 0, code: 0, serialNo: "2021-03-21T18:34:05.247Z,0.1595745625346887" }, { symbol: [1, 4, 4, 3, 9, 1, 9, 9, 8, 9, 4, 7, 7, 8, 3, 6, 7, 7, 1, 7], roundId: 19499, fgRemainGame: 2, lineWins: [{ line: 1, multiplier: 1, wildWin: [5], side: "L", type: "N", symbol: 9, hits: 3, win: .1, wilds: 0 }, { line: 3, multiplier: 1, wildWin: [0], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 5, multiplier: 1, wildWin: [5], side: "L", type: "N", symbol: 7, hits: 3, win: .2, wilds: 0 }, { line: 9, multiplier: 1, wildWin: [5], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 19, multiplier: 1, wildWin: [0], side: "L", type: "N", symbol: 9, hits: 3, win: .1, wilds: 0 }, { line: 25, multiplier: 1, wildWin: [5], side: "L", type: "N", symbol: 7, hits: 3, win: .2, wilds: 0 }, { line: 31, multiplier: 1, wildWin: [0], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 33, multiplier: 1, wildWin: [5], side: "L", type: "N", symbol: 4, hits: 3, win: .3, wilds: 0 }, { line: 35, multiplier: 1, wildWin: [0], side: "L", type: "N", symbol: 9, hits: 3, win: .1, wilds: 0 }], freeGame: { remainingCount: 0, spins: 2, fgTotalGain: 8, currSpin: 6, multiples: 1, currMutiply: 1 }, wayWins: [], featureResults: { multiplierList: { multiplier: 1, win: 1.9 } }, wildWins: [0, 5], balance: 200032.7, totalWin: 1.9, tnum: 508803, successBet: 0, code: 0, serialNo: "2021-03-21T18:34:07.731Z,0.5849414502074664" }, { symbol: [11, 9, 5, 10, 5, 1, 1, 3, 1, 3, 6, 1, 9, 1, 9, 2, 3, 9, 1, 9], roundId: 19500, fgRemainGame: 1, lineWins: [{ line: 1, multiplier: 1, wildWin: [5, 6, 8], side: "L", type: "N", symbol: 3, hits: 5, win: 5, wilds: 0 }, { line: 5, multiplier: 1, wildWin: [5, 11, 13], side: "L", type: "N", symbol: 9, hits: 4, win: .6, wilds: 0 }, { line: 17, multiplier: 1, wildWin: [5, 11], side: "L", type: "N", symbol: 3, hits: 3, win: .3, wilds: 0 }, { line: 21, multiplier: 1, wildWin: [5, 6, 18], side: "L", type: "N", symbol: 9, hits: 5, win: 3, wilds: 0 }, { line: 23, multiplier: 1, wildWin: [5, 6, 8], side: "L", type: "N", symbol: 5, hits: 4, win: 1.4, wilds: 0 }, { line: 25, multiplier: 1, wildWin: [5, 11, 13], side: "L", type: "N", symbol: 9, hits: 5, win: 3, wilds: 0 }], freeGame: { remainingCount: 0, spins: 1, fgTotalGain: 8, currSpin: 7, multiples: 1, currMutiply: 1 }, wayWins: [], featureResults: { multiplierList: { multiplier: 1, win: 13.3 } }, wildWins: [5, 6, 8, 11, 13, 18], balance: 200046, totalWin: 13.3, tnum: 508804, successBet: 0, code: 0, serialNo: "2021-03-21T18:34:22.365Z,0.7847872132613101" }, { symbol: [9, 12, 1, 5, 7, 1, 5, 4, 3, 8, 1, 3, 6, 9, 2, 3, 9, 6, 9, 10], roundId: 19501, fgRemainGame: 0, lineWins: [{ line: 6, multiplier: 1, wildWin: [10, 2], side: "L", type: "N", symbol: 5, hits: 3, win: .3, wilds: 0 }, { line: 23, multiplier: 1, wildWin: [5, 2], side: "L", type: "N", symbol: 5, hits: 3, win: .3, wilds: 0 }], freeGame: { remainingCount: 0, spins: 0, fgTotalGain: 8, currSpin: 8, multiples: 1, currMutiply: 1 }, wayWins: [], featureResults: { multiplierList: { multiplier: 1, win: .6 } }, wildWins: [2, 5, 10], balance: 200046.6, totalWin: .6, tnum: 508805, successBet: 0, code: 0, serialNo: "2021-03-21T18:34:25.048Z,0.5707583936859295" }] } spinGameRequest(t, i, n, s) { let r = { gameCode: l.ConfigManager.getInst().gameCode, line: f.getInst().line, unit: f.getInst().unit, credit: f.getInst().credit, totalBet: f.getInst().totalBet, domination: f.getInst().selectedDenomination, sessionId: f.getInst().loginInfo.sessionId, freeSpin: this.bc ? 0 : i > 0 ? 1 : 0 }; return n && 0 === i && (r = Object.assign(r, s)), t || n || f.getInst().useBalance(r.totalBet), a.getInst().sendRequest(b.COMMAND.SPIN_GAME, r).then((t => (this.bc = !1, this.mc && t.totalWin > 0 && Math.ceil(10 * Math.random()) % 2 == 0 && !t.freeGame.spins && (t.freeGame.spins = 6, this.bc = !0), JSON.stringify(t), 0 === t.code && l.AppConfig.gameConfig.HAS_HORIZONTAL_REEL && e.formatHorizontalAttribute(t), t))) } spinLineGameRequest(t, i, n, s) { let e = { gameCode: l.ConfigManager.getInst().gameCode, line: f.getInst().line, unit: f.getInst().selectedDenomination, credit: f.getInst().credit, totalBet: f.getInst().totalBet, domination: f.getInst().selectedDenomination, sessionId: f.getInst().loginInfo.sessionId, freeSpin: this.bc ? 0 : i > 0 ? 1 : 0 }; return n && (e = Object.assign(e, s)), t || n || f.getInst().useBalance(e.totalBet), a.getInst().sendRequest(b.COMMAND.SPIN_LINE_GAME, e).then((t => (this.bc = !1, this.mc && t.totalWin > 0 && Math.ceil(10 * Math.random()) % 2 == 0 && !t.freeGame.spins && (t.freeGame.spins = 6, this.bc = !0), JSON.stringify(t, null, 2), t))) } userSelectFeatureGame(t) { const i = { gameCode: l.ConfigManager.getInst().gameCode, totalBet: f.getInst().totalBet, fgOptnNo: t, sessionId: f.getInst().loginInfo.sessionId }; return a.getInst().sendRequest(b.COMMAND.FEATURE_WIN_SELECTION, i).then((t => (JSON.stringify(f.getInst().spinInfo, null, 2), t))) } buyFeatureGame(t, i, n) { const s = { gameCode: l.ConfigManager.getInst().gameCode, line: f.getInst().line, unit: f.getInst().unit, credit: f.getInst().credit, totalBet: f.getInst().totalBet, domination: f.getInst().selectedDenomination, sessionId: f.getInst().loginInfo.sessionId, freeSpin: 0, buyFeature: i || 1 }; Object.assign(s, void 0 !== n ? { bfCount: n } : {}), f.getInst().useBalance(i ? f.getInst().gameInfo.setting.buyFeature[i] : s.totalBet); const r = l.AppConfig.gameConfig.SLOT_TYPE === l.SlotType.MEGAWAYS || l.AppConfig.gameConfig.SLOT_TYPE === l.SlotType.WAY_GAME ? b.COMMAND.BUY_FEATURE : b.COMMAND.BUY_FEATURE_LINE_GAME; return a.getInst().sendRequest(r, s).then((i => (JSON.stringify(f.getInst().spinInfo, null, 2), 0 === i.code && (f.getInst().spinInfo = i, l.AppConfig.gameConfig.HAS_HORIZONTAL_REEL && i.megaHSymbol && e.formatHorizontalAttribute(i)), t && t(), i))) } makeGambleBet(t, i) { const n = { gameCode: l.ConfigManager.getInst().gameCode, line: f.getInst().line, unit: f.getInst().unit, credit: f.getInst().credit, totalBet: f.getInst().totalBet, domination: f.getInst().selectedDenomination, sessionId: f.getInst().loginInfo.sessionId, freeSpin: 0, buyFeature: t.buyFeatureIdx, gbType: t.gambleType }; return a.getInst().sendRequest(b.COMMAND.BET_GAMBLE, n).then((t => (i && i(t), t))) } userSessionEnlengthOnRedirect() { const t = { gameCode: l.ConfigManager.getInst().gameCode, sessionId: f.getInst().loginInfo.sessionId }; return a.getInst().sendRequest(b.COMMAND.SESSION_ENLENGTHERN, t).then((t => (JSON.stringify(t, null, 2), t))) } login() { const t = ((t, i) => { for (var n in i || (i = {})) _.call(i, n) && m(t, n, i[n]); if (d) for (var n of d(i)) p.call(i, n) && m(t, n, i[n]); return t })({ channel: "web" }, a.getInst().tryLoadCredentialOnWeb()); return a.getInst().sendRequest(a.COMMAND.LOGIN, t) } }(t => { let i; var n; (n = i = t.COMMAND || (t.COMMAND = {}))[n.START_GAME = 4110] = "START_GAME", n[n.SPIN_GAME = 4113] = "SPIN_GAME", n[n.SPIN_LINE_GAME = 4111] = "SPIN_LINE_GAME", n[n.BALANCE_TOPUP = -3] = "BALANCE_TOPUP", n[n.FEATURE_WIN_SELECTION = 999] = "FEATURE_WIN_SELECTION", n[n.SESSION_ENLENGTHERN = 998] = "SESSION_ENLENGTHERN", n[n.BUY_FEATURE = 703] = "BUY_FEATURE", n[n.BUY_FEATURE_LINE_GAME = 700] = "BUY_FEATURE_LINE_GAME", n[n.BET_GAMBLE = 420] = "BET_GAMBLE", n[n.JACKPOT_INFO = -88] = "JACKPOT_INFO", n[n.JACKPOT_UPDATE = -89] = "JACKPOT_UPDATE" })(b || (b = {})) }, 589: t => { var i, n = n || function(t, i) { var n = {}, s = n.lib = {}, e = function() {}, r = s.Base = { extend: function(t) { e.prototype = this; var i = new e; return t && i.mixIn(t), i.hasOwnProperty("init") || (i.init = function() { i.$super.init.apply(this, arguments) }), i.init.prototype = i, i.$super = this, i }, create: function() { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function() {}, mixIn: function(t) { for (var i in t) t.hasOwnProperty(i) && (this[i] = t[i]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function() { return this.init.prototype.extend(this) } }, h = s.WordArray = r.extend({ init: function(t, i) { t = this.words = t || [], this.sigBytes = null != i ? i : 4 * t.length }, toString: function(t) { return (t || u).stringify(this) }, concat: function(t) { var i = this.words, n = t.words, s = this.sigBytes; if (t = t.sigBytes, this.clamp(), s % 4) for (var e = 0; e < t; e++) i[s + e >>> 2] |= (n[e >>> 2] >>> 24 - e % 4 * 8 & 255) << 24 - (s + e) % 4 * 8; else if (65535 < n.length) for (e = 0; e < t; e += 4) i[s + e >>> 2] = n[e >>> 2]; else i.push.apply(i, n); return this.sigBytes += t, this }, clamp: function() { var i = this.words, n = this.sigBytes; i[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, i.length = t.ceil(n / 4) }, clone: function() { var t = r.clone.call(this); return t.words = this.words.slice(0), t }, random: function(i) { for (var n = [], s = 0; s < i; s += 4) n.push(4294967296 * t.random() | 0); return new h.init(n, i) } }), o = n.enc = {}, u = o.Hex = { stringify: function(t) { var i = t.words; t = t.sigBytes; for (var n = [], s = 0; s < t; s++) { var e = i[s >>> 2] >>> 24 - s % 4 * 8 & 255; n.push((e >>> 4).toString(16)), n.push((15 & e).toString(16)) } return n.join("") }, parse: function(t) { for (var i = t.length, n = [], s = 0; s < i; s += 2) n[s >>> 3] |= parseInt(t.substr(s, 2), 16) << 24 - s % 8 * 4; return new h.init(n, i / 2) } }, a = o.Latin1 = { stringify: function(t) { var i = t.words; t = t.sigBytes; for (var n = [], s = 0; s < t; s++) n.push(String.fromCharCode(i[s >>> 2] >>> 24 - s % 4 * 8 & 255)); return n.join("") }, parse: function(t) { for (var i = t.length, n = [], s = 0; s < i; s++) n[s >>> 2] |= (255 & t.charCodeAt(s)) << 24 - s % 4 * 8; return new h.init(n, i) } }, l = o.Utf8 = { stringify: function(t) { try { return decodeURIComponent(escape(a.stringify(t))) } catch (t) { throw Error("Malformed UTF-8 data") } }, parse: function(t) { return a.parse(unescape(encodeURIComponent(t))) } }, c = s.BufferedBlockAlgorithm = r.extend({ reset: function() { this.Oc = new h.init, this.Ic = 0 }, Nc: function(t) { "string" == typeof t && (t = l.parse(t)), this.Oc.concat(t), this.Ic += t.sigBytes }, ct: function(i) { var n = this.Oc, s = n.words, e = n.sigBytes, r = this.blockSize, o = e / (4 * r); o = i ? t.ceil(o) : t.max((0 | o) - this.Rc, 0); if (e = t.min(4 * (i = o * r), e), i) { for (var u = 0; u < i; u += r) this.Pc(s, u); u = s.splice(0, i), n.sigBytes -= e } return new h.init(u, e) }, clone: function() { var t = r.clone.call(this); return t.Oc = this.Oc.clone(), t }, Rc: 0 }); s.Hasher = c.extend({ cfg: r.extend(), init: function(t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function() { c.reset.call(this), this.Lc() }, update: function(t) { return this.Nc(t), this.ct(), this }, finalize: function(t) { return t && this.Nc(t), this.Cc() }, blockSize: 16, Uc: function(t) { return function(i, n) { return new t.init(n).finalize(i) } }, Fc: function(t) { return function(i, n) { return new f.HMAC.init(t, n).finalize(i) } } }); var f = n.algo = {}; return n }(Math); i = n.lib.WordArray, n.enc.Base64 = { stringify: function(t) { var i = t.words, n = t.sigBytes, s = this.Bc; t.clamp(), t = []; for (var e = 0; e < n; e += 3) for (var r = (i[e >>> 2] >>> 24 - e % 4 * 8 & 255) << 16 | (i[e + 1 >>> 2] >>> 24 - (e + 1) % 4 * 8 & 255) << 8 | i[e + 2 >>> 2] >>> 24 - (e + 2) % 4 * 8 & 255, h = 0; 4 > h && e + .75 * h < n; h++) t.push(s.charAt(r >>> 6 * (3 - h) & 63)); if (i = s.charAt(64)) for (; t.length % 4;) t.push(i); return t.join("") }, parse: function(t) { var n = t.length, s = this.Bc; (e = s.charAt(64)) && -1 != (e = t.indexOf(e)) && (n = e); for (var e = [], r = 0, h = 0; h < n; h++) if (h % 4) { var o = s.indexOf(t.charAt(h - 1)) << h % 4 * 2, u = s.indexOf(t.charAt(h)) >>> 6 - h % 4 * 2; e[r >>> 2] |= (o | u) << 24 - r % 4 * 8, r++ } return i.create(e, r) }, Bc: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" }, function(t) { function i(t, i, n, s, e, r, h) { return ((t = t + (i & n | ~i & s) + e + h) << r | t >>> 32 - r) + i } function s(t, i, n, s, e, r, h) { return ((t = t + (i & s | n & ~s) + e + h) << r | t >>> 32 - r) + i } function e(t, i, n, s, e, r, h) { return ((t = t + (i ^ n ^ s) + e + h) << r | t >>> 32 - r) + i } function r(t, i, n, s, e, r, h) { return ((t = t + (n ^ (i | ~s)) + e + h) << r | t >>> 32 - r) + i } for (var h = n, o = (a = h.lib).WordArray, u = a.Hasher, a = h.algo, l = [], c = 0; 64 > c; c++) l[c] = 4294967296 * t.abs(t.sin(c + 1)) | 0; a = a.MD5 = u.extend({ Lc: function() { this.Dc = new o.init([1732584193, 4023233417, 2562383102, 271733878]) }, Pc: function(t, n) { for (var h = 0; 16 > h; h++) { t[o = n + h] = 16711935 & ((u = t[o]) << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8) } var o, u = t[n + 1], a = t[n + 2], c = t[n + 3], f = t[n + 4], v = t[n + 5], d = t[n + 6], _ = t[n + 7], p = t[n + 8], m = t[n + 9], b = t[n + 10], w = t[n + 11], g = t[n + 12], y = t[n + 13], E = t[n + 14], S = t[n + 15], A = i(A = (h = this.Dc.words)[0], O = h[1], M = h[2], T = h[3], o = t[n + 0], 7, l[0]), T = i(T, A, O, M, u, 12, l[1]), M = i(M, T, A, O, a, 17, l[2]), O = i(O, M, T, A, c, 22, l[3]); A = i(A, O, M, T, f, 7, l[4]), T = i(T, A, O, M, v, 12, l[5]), M = i(M, T, A, O, d, 17, l[6]), O = i(O, M, T, A, _, 22, l[7]), A = i(A, O, M, T, p, 7, l[8]), T = i(T, A, O, M, m, 12, l[9]), M = i(M, T, A, O, b, 17, l[10]), O = i(O, M, T, A, w, 22, l[11]), A = i(A, O, M, T, g, 7, l[12]), T = i(T, A, O, M, y, 12, l[13]), M = i(M, T, A, O, E, 17, l[14]), A = s(A, O = i(O, M, T, A, S, 22, l[15]), M, T, u, 5, l[16]), T = s(T, A, O, M, d, 9, l[17]), M = s(M, T, A, O, w, 14, l[18]), O = s(O, M, T, A, o, 20, l[19]), A = s(A, O, M, T, v, 5, l[20]), T = s(T, A, O, M, b, 9, l[21]), M = s(M, T, A, O, S, 14, l[22]), O = s(O, M, T, A, f, 20, l[23]), A = s(A, O, M, T, m, 5, l[24]), T = s(T, A, O, M, E, 9, l[25]), M = s(M, T, A, O, c, 14, l[26]), O = s(O, M, T, A, p, 20, l[27]), A = s(A, O, M, T, y, 5, l[28]), T = s(T, A, O, M, a, 9, l[29]), M = s(M, T, A, O, _, 14, l[30]), A = e(A, O = s(O, M, T, A, g, 20, l[31]), M, T, v, 4, l[32]), T = e(T, A, O, M, p, 11, l[33]), M = e(M, T, A, O, w, 16, l[34]), O = e(O, M, T, A, E, 23, l[35]), A = e(A, O, M, T, u, 4, l[36]), T = e(T, A, O, M, f, 11, l[37]), M = e(M, T, A, O, _, 16, l[38]), O = e(O, M, T, A, b, 23, l[39]), A = e(A, O, M, T, y, 4, l[40]), T = e(T, A, O, M, o, 11, l[41]), M = e(M, T, A, O, c, 16, l[42]), O = e(O, M, T, A, d, 23, l[43]), A = e(A, O, M, T, m, 4, l[44]), T = e(T, A, O, M, g, 11, l[45]), M = e(M, T, A, O, S, 16, l[46]), A = r(A, O = e(O, M, T, A, a, 23, l[47]), M, T, o, 6, l[48]), T = r(T, A, O, M, _, 10, l[49]), M = r(M, T, A, O, E, 15, l[50]), O = r(O, M, T, A, v, 21, l[51]), A = r(A, O, M, T, g, 6, l[52]), T = r(T, A, O, M, c, 10, l[53]), M = r(M, T, A, O, b, 15, l[54]), O = r(O, M, T, A, u, 21, l[55]), A = r(A, O, M, T, p, 6, l[56]), T = r(T, A, O, M, S, 10, l[57]), M = r(M, T, A, O, d, 15, l[58]), O = r(O, M, T, A, y, 21, l[59]), A = r(A, O, M, T, f, 6, l[60]), T = r(T, A, O, M, w, 10, l[61]), M = r(M, T, A, O, a, 15, l[62]), O = r(O, M, T, A, m, 21, l[63]); h[0] = h[0] + A | 0, h[1] = h[1] + O | 0, h[2] = h[2] + M | 0, h[3] = h[3] + T | 0 }, Cc: function() { var i = this.Oc, n = i.words, s = 8 * this.Ic, e = 8 * i.sigBytes; n[e >>> 5] |= 128 << 24 - e % 32; var r = t.floor(s / 4294967296); for (n[15 + (e + 64 >>> 9 << 4)] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8), n[14 + (e + 64 >>> 9 << 4)] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), i.sigBytes = 4 * (n.length + 1), this.ct(), n = (i = this.Dc).words, s = 0; 4 > s; s++) n[s] = 16711935 & ((e = n[s]) << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8); return i }, clone: function() { var t = u.clone.call(this); return t.Dc = this.Dc.clone(), t } }), h.MD5 = u.Uc(a), h.HmacMD5 = u.Fc(a) }(Math), function() { var t, i = n, s = (t = i.lib).Base, e = t.WordArray, r = (t = i.algo).EvpKDF = s.extend({ cfg: s.extend({ keySize: 4, hasher: t.MD5, iterations: 1 }), init: function(t) { this.cfg = this.cfg.extend(t) }, compute: function(t, i) { for (var n = (o = this.cfg).hasher.create(), s = e.create(), r = s.words, h = o.keySize, o = o.iterations; r.length < h;) { u && n.update(u); var u = n.update(t).finalize(i); n.reset(); for (var a = 1; a < o; a++) u = n.finalize(u), n.reset(); s.concat(u) } return s.sigBytes = 4 * h, s } }); i.EvpKDF = function(t, i, n) { return r.create(n).compute(t, i) } }(), n.lib.Cipher || function(t) { var i = (d = n).lib, s = i.Base, e = i.WordArray, r = i.BufferedBlockAlgorithm, h = d.enc.Base64, o = d.algo.EvpKDF, u = i.Cipher = r.extend({ cfg: s.extend(), createEncryptor: function(t, i) { return this.create(this.jc, t, i) }, createDecryptor: function(t, i) { return this.create(this.Gc, t, i) }, init: function(t, i, n) { this.cfg = this.cfg.extend(n), this.Wc = t, this.Hc = i, this.reset() }, reset: function() { r.reset.call(this), this.Lc() }, process: function(t) { return this.Nc(t), this.ct() }, finalize: function(t) { return t && this.Nc(t), this.Cc() }, keySize: 4, ivSize: 4, jc: 1, Gc: 2, Uc: function(t) { return { encrypt: function(i, n, s) { return ("string" == typeof n ? _ : v).encrypt(t, i, n, s) }, decrypt: function(i, n, s) { return ("string" == typeof n ? _ : v).decrypt(t, i, n, s) } } } }); i.StreamCipher = u.extend({ Cc: function() { return this.ct(!0) }, blockSize: 1 }); var a = d.mode = {}, l = function(t, i, n) { var s = this.Xc; s ? this.Xc = undefined : s = this.Vc; for (var e = 0; e < n; e++) t[i + e] ^= s[e] }, c = (i.BlockCipherMode = s.extend({ createEncryptor: function(t, i) { return this.Encryptor.create(t, i) }, createDecryptor: function(t, i) { return this.Decryptor.create(t, i) }, init: function(t, i) { this.$c = t, this.Xc = i } })).extend(); c.Encryptor = c.extend({ processBlock: function(t, i) { var n = this.$c, s = n.blockSize; l.call(this, t, i, s), n.encryptBlock(t, i), this.Vc = t.slice(i, i + s) } }), c.Decryptor = c.extend({ processBlock: function(t, i) { var n = this.$c, s = n.blockSize, e = t.slice(i, i + s); n.decryptBlock(t, i), l.call(this, t, i, s), this.Vc = e } }), a = a.CBC = c, c = (d.pad = {}).Pkcs7 = { pad: function(t, i) { for (var n, s = (n = (n = 4 * i) - t.sigBytes % n) << 24 | n << 16 | n << 8 | n, r = [], h = 0; h < n; h += 4) r.push(s); n = e.create(r, n), t.concat(n) }, unpad: function(t) { t.sigBytes -= 255 & t.words[t.sigBytes - 1 >>> 2] } }, i.BlockCipher = u.extend({ cfg: u.cfg.extend({ mode: a, padding: c }), reset: function() { u.reset.call(this); var t = (i = this.cfg).iv, i = i.mode; if (this.Wc == this.jc) var n = i.createEncryptor; else n = i.createDecryptor, this.Rc = 1; this.Yc = n.call(i, this, t && t.words) }, Pc: function(t, i) { this.Yc.processBlock(t, i) }, Cc: function() { var t = this.cfg.padding; if (this.Wc == this.jc) { t.pad(this.Oc, this.blockSize); var i = this.ct(!0) } else i = this.ct(!0), t.unpad(i); return i }, blockSize: 4 }); var f = i.CipherParams = s.extend({ init: function(t) { this.mixIn(t) }, toString: function(t) { return (t || this.formatter).stringify(this) } }), v = (a = (d.format = {}).OpenSSL = { stringify: function(t) { var i = t.ciphertext; return ((t = t.salt) ? e.create([1398893684, 1701076831]).concat(t).concat(i) : i).toString(h) }, parse: function(t) { var i = (t = h.parse(t)).words; if (1398893684 == i[0] && 1701076831 == i[1]) { var n = e.create(i.slice(2, 4)); i.splice(0, 4), t.sigBytes -= 16 } return f.create({ ciphertext: t, salt: n }) } }, i.SerializableCipher = s.extend({ cfg: s.extend({ format: a }), encrypt: function(t, i, n, s) { s = this.cfg.extend(s); var e = t.createEncryptor(n, s); return i = e.finalize(i), f.create({ ciphertext: i, key: n, iv: (e = e.cfg).iv, algorithm: t, mode: e.mode, padding: e.padding, blockSize: t.blockSize, formatter: s.format }) }, decrypt: function(t, i, n, s) { return s = this.cfg.extend(s), i = this.zc(i, s.format), t.createDecryptor(n, s).finalize(i.ciphertext) }, zc: function(t, i) { return "string" == typeof t ? i.parse(t, this) : t } })), d = (d.kdf = {}).OpenSSL = { execute: function(t, i, n, s) { return s || (s = e.random(8)), t = o.create({ keySize: i + n }).compute(t, s), n = e.create(t.words.slice(i), 4 * n), t.sigBytes = 4 * i, f.create({ key: t, iv: n, salt: s }) } }, _ = i.PasswordBasedCipher = v.extend({ cfg: v.cfg.extend({ kdf: d }), encrypt: function(t, i, n, s) { return n = (s = this.cfg.extend(s)).kdf.execute(n, t.keySize, t.ivSize), s.iv = n.iv, (t = v.encrypt.call(this, t, i, n.key, s)).mixIn(n), t }, decrypt: function(t, i, n, s) { return s = this.cfg.extend(s), i = this.zc(i, s.format), n = s.kdf.execute(n, t.keySize, t.ivSize, i.salt), s.iv = n.iv, v.decrypt.call(this, t, i, n.key, s) } }) }(), function() { for (var t = n, i = t.lib.BlockCipher, s = t.algo, e = [], r = [], h = [], o = [], u = [], a = [], l = [], c = [], f = [], v = [], d = [], _ = 0; 256 > _; _++) d[_] = 128 > _ ? _ << 1 : _ << 1 ^ 283; var p = 0, m = 0; for (_ = 0; 256 > _; _++) { var b; e[p] = b = (b = m ^ m << 1 ^ m << 2 ^ m << 3 ^ m << 4) >>> 8 ^ 255 & b ^ 99, r[b] = p; var w = d[p], g = d[w], y = d[g], E = 257 * d[b] ^ 16843008 * b; h[p] = E << 24 | E >>> 8, o[p] = E << 16 | E >>> 16, u[p] = E << 8 | E >>> 24, a[p] = E, l[b] = (E = 16843009 * y ^ 65537 * g ^ 257 * w ^ 16843008 * p) << 24 | E >>> 8, c[b] = E << 16 | E >>> 16, f[b] = E << 8 | E >>> 24, v[b] = E, p ? (p = w ^ d[d[d[y ^ w]]], m ^= d[d[m]]) : p = m = 1 } var S = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]; s = s.AES = i.extend({ Lc: function() { for (var t = (n = this.Hc).words, i = n.sigBytes / 4, n = 4 * ((this.Kc = i + 6) + 1), s = this.qc = [], r = 0; r < n; r++) if (r < i) s[r] = t[r]; else { var h = s[r - 1]; r % i ? 6 < i && 4 == r % i && (h = e[h >>> 24] << 24 | e[h >>> 16 & 255] << 16 | e[h >>> 8 & 255] << 8 | e[255 & h]) : (h = e[(h = h << 8 | h >>> 24) >>> 24] << 24 | e[h >>> 16 & 255] << 16 | e[h >>> 8 & 255] << 8 | e[255 & h], h ^= S[r / i | 0] << 24), s[r] = s[r - i] ^ h } for (t = this.Zc = [], i = 0; i < n; i++) r = n - i, h = i % 4 ? s[r] : s[r - 4], t[i] = 4 > i || 4 >= r ? h : l[e[h >>> 24]] ^ c[e[h >>> 16 & 255]] ^ f[e[h >>> 8 & 255]] ^ v[e[255 & h]] }, encryptBlock: function(t, i) { this.Jc(t, i, this.qc, h, o, u, a, e) }, decryptBlock: function(t, i) { var n = t[i + 1]; t[i + 1] = t[i + 3], t[i + 3] = n, this.Jc(t, i, this.Zc, l, c, f, v, r), n = t[i + 1], t[i + 1] = t[i + 3], t[i + 3] = n }, Jc: function(t, i, n, s, e, r, h, o) { for (var u = this.Kc, a = t[i] ^ n[0], l = t[i + 1] ^ n[1], c = t[i + 2] ^ n[2], f = t[i + 3] ^ n[3], v = 4, d = 1; d < u; d++) { var _ = s[a >>> 24] ^ e[l >>> 16 & 255] ^ r[c >>> 8 & 255] ^ h[255 & f] ^ n[v++], p = s[l >>> 24] ^ e[c >>> 16 & 255] ^ r[f >>> 8 & 255] ^ h[255 & a] ^ n[v++], m = s[c >>> 24] ^ e[f >>> 16 & 255] ^ r[a >>> 8 & 255] ^ h[255 & l] ^ n[v++]; f = s[f >>> 24] ^ e[a >>> 16 & 255] ^ r[l >>> 8 & 255] ^ h[255 & c] ^ n[v++], a = _, l = p, c = m } _ = (o[a >>> 24] << 24 | o[l >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & f]) ^ n[v++], p = (o[l >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[f >>> 8 & 255] << 8 | o[255 & a]) ^ n[v++], m = (o[c >>> 24] << 24 | o[f >>> 16 & 255] << 16 | o[a >>> 8 & 255] << 8 | o[255 & l]) ^ n[v++], f = (o[f >>> 24] << 24 | o[a >>> 16 & 255] << 16 | o[l >>> 8 & 255] << 8 | o[255 & c]) ^ n[v++], t[i] = _, t[i + 1] = p, t[i + 2] = m, t[i + 3] = f }, keySize: 8 }); t.AES = i.Uc(s) }(), n.pad.ZeroPadding = { pad: function(t, i) { var n = 4 * i; t.clamp(), t.sigBytes += n - (t.sigBytes % n || n) }, unpad: function(t) { for (var i = t.words, n = t.sigBytes - 1; !(i[n >>> 2] >>> 24 - n % 4 * 8 & 255);) n--; t.sigBytes = n + 1 } }, t.exports = n }, 8661: (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.d(__webpack_exports__, { e: () => BetHistory }); var _common_js_Utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2445), _gen3_app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204), _gen3_network__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(380), _gen3_utility__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4665), __async = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); const assetsPath = "Mahjong Phoenix_files", betHistoryAssets = `${assetsPath}`, gameOverlayEl = document.getElementById("game-overlay"); let betHistoryEl, mainEl, backBtn, currentPage, currentDate, selectedDate, symbolCodeMapping = {}; class BetHistoryManager { constructor() { this.init() } init() { return __async(this, null, (function*() { if (this.ll) return; _common_js_Utils_js__WEBPACK_IMPORTED_MODULE_3__.j(`${assetsPath}/style.css`), _common_js_Utils_js__WEBPACK_IMPORTED_MODULE_3__.j(`${assetsPath}/style.css`), _common_js_Utils_js__WEBPACK_IMPORTED_MODULE_3__.j(`${assetsPath}/custom.css`); const t = yield _common_js_Utils_js__WEBPACK_IMPORTED_MODULE_3__.bE(`${betHistoryAssets}/html/bet-history.html`); gameOverlayEl.insertAdjacentHTML("beforeend", t.replace(/@assetsPath@/g, assetsPath)), betHistoryEl = document.getElementById("betHistory"), mainEl = betHistoryEl.querySelector(".main-content"), backBtn = betHistoryEl.querySelector(".back-button"), symbolCodeMapping = yield _common_js_Utils_js__WEBPACK_IMPORTED_MODULE_3__.tf(`${betHistoryAssets}/config.json`), this.ll = !0 })) } open() { return __async(this, null, (function*() { function t() { mainEl.setAttribute("id", "transactionList"), mainEl.removeAttribute("ticketId"), backBtn.style.display = "none", pageChange() } _common_js_Utils_js__WEBPACK_IMPORTED_MODULE_3__.Mw(betHistoryEl), t(), selectedDate = "", backBtn.addEventListener("click", (function(i) { t(), i.preventDefault() })) })) } } function pageChange() { return __async(this, null, (function*() { var t; yield loadBetHistoryTemplate(); const i = betHistoryEl.querySelector("tbody tr"); document.getElementById("transactionList") && (_gen3_app__WEBPACK_IMPORTED_MODULE_0__.ConfigManager.getInst().betHistory.dateSelector ? (document.getElementById("betDate").value = selectedDate || (new Date).toLocaleDateString("en-CA", { timeZone: "Asia/Kuala_Lumpur", year: "numeric", month: "2-digit", day: "2-digit" }), document.getElementById("betDate").addEventListener("change", (function() { selectedDate = document.getElementById("betDate").value, document.getElementById("loading").style.display = "revert", document.getElementById("showMore").style.display = "none", fillTableRow(i, 0) }))) : null == (t = document.getElementById("dateSelector")) || t.remove(), document.getElementById("showMore").addEventListener("click", (function() { document.getElementById("loading").style.display = "revert", document.getElementById("showMore").style.display = "none", fillTableRow(i, currentPage) }))), fillTableRow(i, 0) })) } function loadBetHistoryTemplate() { return __async(this, null, (function*() { const t = mainEl.id; let i = ""; "transactionList" === t ? i = "transaction-list" : "detailNew" === t && (i = "detail-new"); const n = yield _common_js_Utils_js__WEBPACK_IMPORTED_MODULE_3__.bE(`${betHistoryAssets}/html/section/_${i}.html`); mainEl.innerHTML = n.replace(/@assetsPath@/g, assetsPath); const s = yield _common_js_Utils_js__WEBPACK_IMPORTED_MODULE_3__.bE(`${betHistoryAssets}/html/tr/_tr_${i}.html`); betHistoryEl.querySelector("tbody").innerHTML = s.replace(/@assetsPath@/g, assetsPath); const e = yield _common_js_Utils_js__WEBPACK_IMPORTED_MODULE_3__.vf(`${betHistoryAssets}/locale/`, _gen3_app__WEBPACK_IMPORTED_MODULE_0__.Localization.getCurrentLanguage()); _common_js_Utils_js__WEBPACK_IMPORTED_MODULE_3__.O9(betHistoryEl, e) })) } function updateContentByBrowserZoom() { const t = Math.round(100 * window.devicePixelRatio), i = document.documentElement; i.removeAttribute("class"), t >= 100 && t <= 113 ? i.classList.add("zoom-100") : t > 113 && t <= 125 ? i.classList.add("zoom-125") : t > 125 && t <= 150 && i.classList.add("zoom-150") } function getBetHistoryDetail(t) { return __async(this, null, (function*() { updateContentByBrowserZoom(), window.addEventListener("resize", updateContentByBrowserZoom); const i = document.getElementById("detailNew"), n = i ? i.getAttribute("ticketId") : "", s = document.getElementById("betDate"); currentDate = s ? s.value : selectedDate || (new Date).toLocaleDateString("en-CA", { timeZone: "Asia/Kuala_Lumpur", year: "numeric", month: "2-digit", day: "2-digit" }), void 0 !== t && (currentPage = t); const e = _gen3_app__WEBPACK_IMPORTED_MODULE_0__.ConfigManager.getInst().betHistory, r = new URL(e.url + e.detailURL); r.searchParams.set("code", _gen3_app__WEBPACK_IMPORTED_MODULE_0__.ConfigManager.getInst().gameCode), r.searchParams.set("gameCode", _gen3_app__WEBPACK_IMPORTED_MODULE_0__.ConfigManager.getInst().gameCode), r.searchParams.set("language", _gen3_app__WEBPACK_IMPORTED_MODULE_0__.Localization.getCurrentLanguage()), r.searchParams.set("sid", _gen3_network__WEBPACK_IMPORTED_MODULE_1__.fL.getInst().sessionId), r.searchParams.set("token", _gen3_network__WEBPACK_IMPORTED_MODULE_1__.fL.getInst().token), r.searchParams.set("ticketNumber", n), r.searchParams.set("date", currentDate), r.searchParams.set("pageNo", ++currentPage); const h = yield fetch(r.toString()); return yield h.json() })) } let latestRequestId = 0; function fillTableRow(currentTemplate, page) { return __async(this, null, (function*() { if (!currentTemplate) return; const tbodyEl = betHistoryEl.querySelector("tbody"), currentRequestId = ++latestRequestId; 0 == page && (tbodyEl.innerHTML = ""); const currentJson = yield getBetHistoryDetail(page); if (currentRequestId === latestRequestId) if (currentJson.list) if (currentJson.list.forEach((function(value) { const currentTemplateClone = currentTemplate.cloneNode(!0), currentTemplateCloneTd = currentTemplateClone.querySelectorAll("td"); for (let i = 0; i < currentTemplateCloneTd.length; i++) { const item = currentTemplateCloneTd[i], dataTransformer = item.getAttribute("data-transformer"), dataKey = item.getAttribute("data-key"); let transformerFn = transformers.identity; const transformerStr = dataTransformer; transformerStr && (transformerFn = eval(transformerStr)), dataKey && (item.innerHTML = transformerFn(value[dataKey])) } tbodyEl.appendChild(currentTemplateClone) })), colorizeTableRows(), colorizeTableRows("lastBalance"), tbodyEl.style.display = "revert", document.getElementById("transactionList")) { document.getElementById("loading").style.display = "none", document.getElementById("showMore").style.display = currentJson.page.lastPage ? "none" : "revert", mainEl.querySelector(".container").style.height = mainEl.querySelector(".table").clientHeight + 250 + "px"; const t = betHistoryEl.querySelectorAll(".toDetailNew"); t.forEach((function(t) { t.addEventListener("click", (function() { const t = this.querySelector('[data-key="ticketId"]').innerHTML; mainEl.setAttribute("id", "detailNew"), mainEl.setAttribute("ticketId", t), backBtn.style.display = "block", pageChange() })) })) } else document.getElementById("detailNew") && (detailNewFill(currentJson.list[0]), document.getElementById("loading").style.display = "none", document.querySelector("#detailNew .container").style.display = "block"); else document.getElementById("loading").style.display = "none" })) } function detailNewFill(t) { var i, n, s; generateReelsPreview(t); let e = t.specialType; const r = JSON.parse(t.featureResults), h = (i = null == r ? void 0 : r.multiplierList, (null == (n = null == r ? void 0 : r.multiplierList) ? void 0 : n.mulCurr) || (null == (s = null == r ? void 0 : r.multiplierList) ? void 0 : s.multiplier)), o = t.betAmt + t.wlAmt; if (o > 0) { const t = betHistoryEl.querySelector("#didWin"); t.style.display = "block", t.innerHTML = transformers.toCurrency(o) } else { const t = betHistoryEl.querySelector("#noWin"); t.style.display = "block", t.parentElement.classList.remove("content-center") } h && (betHistoryEl.querySelector("#multiplier-value").innerHTML = h + "X"), e = _gen3_utility__WEBPACK_IMPORTED_MODULE_2__.cQ.gameUtils.getSpecialSpinType(r, e), e && (betHistoryEl.querySelector("#specialWinType_" + e.replace(/\s/g, "").toLowerCase()).style.display = "block"); const u = betHistoryEl.querySelector("#jackpot-value"), a = betHistoryEl.querySelector("#maingame-value"), l = betHistoryEl.querySelector("#freegame-value"), c = betHistoryEl.querySelector("#bonus-value"); if (r.buyFeature > 0) { if (a.innerHTML = "0.00", u.innerHTML = "-", 1 == r.buyFeature) l.innerHTML = o.toFixed(2), c.innerHTML = "-"; else if (2 == r.buyFeature && (l.innerHTML = "-", r.bsList)) { const t = r.bsList.bsPrizeDisplay ? r.bsList.bsPrizeDisplay : [], i = r.bsList.bsMultiplierDisplayBuyBonus ? r.bsList.bsMultiplierDisplayBuyBonus : [], n = []; for (let s = 0; s < t.length; s++) n.push(t[s] > 0 ? Number(t[s]).toFixed(2) + " (" + i[s] + "X)" : Number(t[s]).toFixed(2)); c.innerHTML = n } "Buy Freegame" === e && (document.getElementById("gameboardView").style.display = "none") } else if (r.bsList) { let t = r.bsList.bsPrizeDisplay ? r.bsList.bsPrizeDisplay : []; t = t.map((function(t) { return Number(t).toFixed(2) })), a.innerHTML = "0.00", l.innerHTML = "-", c.innerHTML = t, u.innerHTML = "-" } else r.jpWinAmount && r.jpWinAmount > 0 ? (a.innerHTML = "-", l.innerHTML = "-", c.innerHTML = "-", u.innerHTML = r.jpWinAmount.toFixed(2)) : "Free" == e || "Respin free" == e || "Free respin" == e ? (a.innerHTML = "0.00", l.innerHTML = o.toFixed(2), c.innerHTML = "-", u.innerHTML = "-") : r.gbInfo ? (u.innerHTML = "-", a.innerHTML = "-", l.innerHTML = "-", c.innerHTML = o.toFixed(2)) : (u.innerHTML = "-", a.innerHTML = o.toFixed(2), l.innerHTML = "-", c.innerHTML = "-") } function generateReelsPreview(t) { const i = t.result; if (!i) return; const n = i.split(",").map(String), s = t.gameCode.indexOf(["sProsDrg"]) > -1, e = _gen3_app__WEBPACK_IMPORTED_MODULE_0__.AppConfig.gameConfig.HAS_HORIZONTAL_REEL, r = _gen3_app__WEBPACK_IMPORTED_MODULE_0__.AppConfig.gameConfig.BE_RESPONSE_FORMAT, h = _gen3_app__WEBPACK_IMPORTED_MODULE_0__.AppConfig.gameConfig.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL, o = _gen3_app__WEBPACK_IMPORTED_MODULE_0__.AppConfig.gameConfig.GameBoard.NUMBER_OF_REELS, u = _gen3_app__WEBPACK_IMPORTED_MODULE_0__.AppConfig.gameConfig.GameBoard.SYMBOL_HEIGHT / 2.5, a = _gen3_app__WEBPACK_IMPORTED_MODULE_0__.AppConfig.gameConfig.GameBoard.SYMBOL_WIDTH / 2.5, l = _gen3_app__WEBPACK_IMPORTED_MODULE_0__.AppConfig.gameConfig.GameBoard.BOARD_REAL_SYMBOL_MAPPING, c = (t, i) => !l || (l[t][i] || !1), f = _gen3_app__WEBPACK_IMPORTED_MODULE_0__.AppConfig.gameConfig.GameBoard.REEL_POSITION_OFFSET, v = []; for (let t = 0; t < o; t++) v.push(f && 0 !== f[t] ? Math.floor(100 * f[t] / _gen3_app__WEBPACK_IMPORTED_MODULE_0__.AppConfig.gameConfig.GameBoard.SYMBOL_HEIGHT) : 0); const d = document.getElementById("gameboardView"), _ = document.createElement("table"); if (e) { const t = n.slice(0, o), i = document.createElement("tr"); t.forEach((function(t, n) { const s = t.split(":").map(Number), e = s[0], r = s[1], h = s[2]; if (!isNaN(e)) { const t = document.createElement("td"), s = document.createElement("div"); if (e > 0) { const t = _gen3_utility__WEBPACK_IMPORTED_MODULE_2__.cQ.gameUtils.betHistoryGetSymbolImageStrings(symbolCodeMapping[e], r, h); if (s.style.backgroundImage = `url('${`${betHistoryAssets}/img/${t.symbol}`}')`, null !== t.frame) { const i = document.createElement("div"); i.style.backgroundImage = `url('${`${betHistoryAssets}/img/${t.frame}`}')`, i.style.height = `${u}px`, i.style.width = `${a}px`, i.classList.add("symbol-img"), s.appendChild(i) } } s.style.height = `${u}px`, s.style.width = `${a}px`, s.classList.add("symbol-img"), t.appendChild(s), i.appendChild(t), !1 === c(n, 0) && (t.style.opacity = "0"), 0 !== v[n] && (t.style.transform = `translate(0, ${v[n]}%)`) } })), _.appendChild(i) } for (let t = 0; t < h; t++) _.appendChild(document.createElement("tr")); d.appendChild(_); const p = d.querySelectorAll("table tr"); let m = e ? n.slice(o) : n, b = 0; m = _gen3_utility__WEBPACK_IMPORTED_MODULE_2__.cQ.gameUtils.updateBetHistorySymResult ? _gen3_utility__WEBPACK_IMPORTED_MODULE_2__.cQ.gameUtils.updateBetHistorySymResult(m, t, document) : m, m.forEach((function(t, i) { (i += b) % h == 0 && (b = 0); const n = t.split(":").map(Number), l = n[0]; if (0 === l && !s) return; const f = n[1], d = n[2], _ = document.createElement("td"), m = document.createElement("div"), w = _gen3_utility__WEBPACK_IMPORTED_MODULE_2__.cQ.gameUtils.betHistoryGetSymbolImageStrings(symbolCodeMapping[l], f, d); switch (m.style.backgroundImage = `url('${`${betHistoryAssets}/img/${w.symbol}`}')`, m.style.height = `${u}px`, m.style.width = `${a}px`, m.classList.add("symbol-img"), f) { case 1: _.setAttribute("rowspan", 4), m.style.height = 4 * u + "px", b += 3; break; case 2: _.setAttribute("rowspan", 3), m.style.height = 3 * u + "px", b += 2; break; case 3: _.setAttribute("rowspan", 2), m.style.height = 2 * u + "px", b += 1 } if (_.appendChild(m), null !== w.frame) { const t = document.createElement("div"); t.style.backgroundImage = `url('${`${betHistoryAssets}/img/${w.frame}`}')`, t.style.height = m.style.height, t.style.width = m.style.width, t.classList.add("symbol-img"), m.appendChild(t) } if (r === _gen3_app__WEBPACK_IMPORTED_MODULE_0__.ResponseFormat.MEGA_SYMBOL) { p[e ? i % h + 1 : i % h].appendChild(_), !1 === c(Math.floor(i / h), i % h) && (_.style.opacity = "0"), 0 !== v[Math.floor(i / h)] && (_.style.transform = `translate(0, ${v[Math.floor(i/h)]}%)`) } else p[Math.floor(i / o)].appendChild(_), !1 === c(Math.floor(i / o), i % o) && (_.style.opacity = "0"), 0 !== v[i % o] && (_.style.transform = `translate(0, ${v[i%o]}%)`) })), d.appendChild(_) } function colorizeTableRows(t) { betHistoryEl.querySelectorAll('td[data-key="' + (t || "wlAmt") + '"]').forEach((function(t) { "" !== t.innerHTML && Number(t.innerHTML.replace(/,/g, "")) > 0 && (t.classList.remove("profit-color-minus"), t.classList.add("profit-color-plus")) })) } const nativeLang = {}, transformers = { identity: function(t) { return t }, toFixed: function(t) { return function(i) { return Number(i).toFixed(t) } }, toCurrency: function(t) { return Number(t).toFixed(2).replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,") }, datetime: function() { return function(t) { const i = t.split(" "); if (2 !== i.length) return t; return i[1] + " " + i[0].split("-").reverse().join("/") } }, translate: function(t) { return nativeLang[t] || t } }, BetHistory = new BetHistoryManager }, 2445: (t, i, n) => { "use strict"; n.d(i, { Mw: () => v, O9: () => f, tf: () => l, bE: () => u, j: () => a, r1: () => d, s2: () => _, vf: () => c }); var s = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); const e = "en_US", r = 864e5, h = 36e5, o = 6e4; function u(t) { return s(this, null, (function*() { try { const i = yield fetch(t); return yield i.text() } catch (t) { throw t } })) } function a(t) { const i = document.createElement("link"), n = document.styleSheets; for (let i = 0; i < n.length; i++) if (null !== n[i].href && n[i].href.match(t)) return; i.rel = "stylesheet", i.href = t, document.head.appendChild(i) } function l(t) { return s(this, null, (function*() { try { const i = yield fetch(t); return yield i.json() } catch (t) { throw t } })) } function c(t, i) { return s(this, null, (function*() { let n, s, r; try { n = `${t}${i}.json`, s = yield fetch(n), r = yield s.json() } catch (i) { n = `${t}${e}.json`, s = yield fetch(n), r = yield s.json() } return r })) } function f(t, i) { const n = t.querySelectorAll("translate"); if (n && n.length > 0) for (const t of n) { let n = i[t.innerHTML]; if (void 0 !== n && "NaN" !== n) { const i = {}; for (const n of t.attributes) i[n.name] = n.value; i && Object.keys(i).forEach((t => { n = n.replace("${" + t + "}", i[t]) })), t.outerHTML = n } } } function v(t) { const i = document.getElementById("game-container"); function n() { t.style.height = i.style.height, t.style.width = i.style.width } document.getElementById("game-overlay").style.visibility = "visible", t.style.display = "block", n(), setTimeout((function() { t.classList.add("show") }), 100), window.addEventListener("wheel", (t => t.stopPropagation()), !0), window.addEventListener("touchmove", (t => t.stopPropagation()), !0), window.addEventListener("resize", n); t.querySelector(".close-button").addEventListener("click", (function() { window.addEventListener("wheel", (t => t.preventDefault()), { passive: !1 }), window.addEventListener("touchmove", (t => t.preventDefault()), { passive: !1 }), t.classList.remove("show"), setTimeout((function() { t.style.display = "none" }), 500) })) } function d(t, i) { return { days: Math.floor(t / r), hours: Math.floor("hours" === i ? t / h : t % r / h), minutes: Math.floor("minutes" === i ? t / o : t % h / o), seconds: Math.floor(t % o / 1e3) } } function _() { return /Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) } }, 3567: (t, i, n) => { "use strict"; n.d(i, { ej: () => j, zx: () => d, Ff: () => T, B1: () => G, WP: () => y, ZG: () => I, pw: () => N, Cg: () => D, kQ: () => O, Mc: () => b, YH: () => A, ZD: () => p, EV: () => F }); var s = n(4665), e = (n(4936), n(229)), r = (n(4433), n(3930), n(8759), n(6335)), h = n(6480), o = (n(4577), n(4062), n(6002), n(1735), n(5849)), u = (n(5700), n(2877)), a = (n(3767), n(5868), n(4258), n(4431)), l = n(6359); n(8971), n(5273), n(941); class c extends r.EventEmitter { constructor(t) { super(), this.insetContainer = t.background ? t.background : new h.W2, this.contentContainer = this.insetContainer.addChild(new h.W2), this.insetContainer.on("pointerdown", (t => { this.onPointerPress(t) })), this.insetContainer.on("pointermove", (t => { this.onPointerMove(t) })), this.insetContainer.on("pointerup", (t => { this.onPointerRelease(t) })), this.insetContainer.on("pointerupoutside", (t => { this.onPointerExit(t) })), this.insetContainer.on("pointerout", (t => { this.onPointerExit(t) })), this.insetContainer.on("pointerover", (t => { this.onPointerEnter(t) })), this.insetContainer.on("rightclick", (t => { this.onRightClick(t) })) } getContainer() { return this.insetContainer } onPointerPress(t) {} onPointerMove(t) {} onPointerRelease(t) { this.onClick(t) } onPointerExit(t) {} onPointerEnter(t) {} onRightClick(t) {} onClick(t) {} } const f = class extends c { constructor(t) { super(t), this.Br = null, this.if = 16777215, this.nf = null, this.ef = null, t.text && (this.Br = this.contentContainer.addChild(t.text), this.Br.anchor.set(.5)), this.nf = t.background.texture, t.offTexture && (this.ef = t.offTexture), this.insetContainer.interactive = !0, this.insetContainer.buttonMode = !0 } setInteractable(t, i = !1) { t ? (this.insetContainer.interactive = !0, this.nf && this.insetContainer.texture ? (this.insetContainer.texture = this.nf, this.rf(this.if)) : this.rf(this.if)) : (this.insetContainer.interactive = !1, i || (this.ef && this.insetContainer.texture ? (this.insetContainer.texture = this.ef, this.rf(f.HOLD_MUL_COLOR)) : this.rf(f.DISABLE_MUL_COLOR))) } getContainer() { return this.insetContainer } getText() { return this.Br } onPointerPress(t) { super.onPointerPress(t), !0 === this.insetContainer.interactive && this.rf(f.HOLD_MUL_COLOR) } onPointerRelease(t) { super.onPointerRelease(t), !0 === this.insetContainer.interactive && this.rf(this.if) } onPointerExit(t) { super.onPointerExit(t), !0 === this.insetContainer.interactive && this.rf(this.if) } onPointerEnter(t) { super.onPointerEnter(t) } rf(t) { this.insetContainer.tint && (this.insetContainer.tint = t), this.Br && (this.Br.tint = t) } }; let v = f; v.HOLD_MUL_COLOR = 10855845, v.DISABLE_MUL_COLOR = 7171437, v.ENABLE_MUL_COLOR = 16777215; class d extends v { constructor(t) { var i, n, s, e, r, h, o; return super({ background: null != (i = t.background) ? i : null, offTexture: null != (n = t.offTexture) ? n : null, text: null != (s = t.text) ? s : null }), this.hf = null != (e = t.buttonStype) ? e : 1, this.uf = null != (r = t.colorTextHighlight) ? r : null, this.af = null != (o = null == (h = t.text) ? void 0 : h.style.fill[0]) ? o : 16777215, this } disableRespondEffect(t) { this.if = t ? v.HOLD_MUL_COLOR : 16777215, this.rf(this.if) } onClick(t) { super.onClick(t), this.emit("click", t) } onPointerEnter(t) { this.uf && (this.getText().style.fill = this.uf) } onPointerPress(t) { !0 === this.insetContainer.interactive && t.data.isPrimary && ((1 & this.hf) > 0 && this.rf(v.HOLD_MUL_COLOR), (2 & this.hf) > 0 && s.kX.to(100, this.getContainer().scale, { x: .9, y: .9 })) } onPointerRelease(t) { !0 === this.insetContainer.interactive && t.data.isPrimary && ((1 & this.hf) > 0 && this.rf(this.if), this.uf && (this.getText().style.fill = this.af), (2 & this.hf) > 0 && s.kX.to(100, this.getContainer().scale, { x: 1, y: 1 }), this.onClick(t)) } onPointerExit(t) { !0 === this.insetContainer.interactive && t.data.isPrimary && ((1 & this.hf) > 0 && this.rf(this.if), this.uf && (this.getText().style.fill = this.af), (2 & this.hf) > 0 && s.kX.to(100, this.contentContainer.scale, { x: 1, y: 1 })) } } var _ = n(204); class p extends v { constructor(t) { return super({ background: new o.j(t.textureDefault), text: t.text }), this.lf = !1, this.nf = t.textureDefault, this.ef = t.textureToggle, t.text && (t.textColorDefault && (this.cf = t.textColorDefault), t.textColorToggle && (this.ff = t.textColorToggle)), this } onClick(t) { super.onClick(t), this.toggle(), this.emit("click", t, this.lf) } toggle() { this.lf ? (this.insetContainer.texture && (this.insetContainer.texture = this.nf), this.cf && (this.getText().style.fill = [this.cf]), this.lf = !1) : (this.insetContainer.texture && (this.insetContainer.texture = this.ef), this.ff && (this.getText().style.fill = [this.ff]), this.lf = !0) } isToggled() { return this.lf } setToggle(t) { this.lf !== t && this.toggle() } } class m extends h.W2 { constructor(t, i = null) { super(), this.df = null, this._f = null, this.df = t, this.df instanceof a.Xz ? this.df.anchor.set(0) : this.df.anchor.set(0, .5), null !== i && (this._f = i), this.addChild(this.df) } setAnimateTextSize(t) { this.df instanceof a.Xz ? this.df.fontSize = t : this.df.style.fontSize = t } setTextByNumber(t, i = !0) { this.df.text = i ? null !== this._f ? `${this._f} ${s.JK.currencyFormatAmount(t,!0)}` : `${s.JK.currencyFormatAmount(t,!0)}` : null !== this._f ? `${this._f} ${Math.floor(t)}` : `${Math.floor(t)}` } alignCenter() { this.df instanceof a.Xz ? this.df.x = -this.df.textWidth / 2 : this.df.anchor.set(.5) } alignRight() { this.df instanceof a.Xz ? this.df.x = -this.df.textWidth : this.df.anchor.set(1, .5) } getAnimateText() { return this.df } } class b extends m { constructor(t, i = null) { super(t, i), this.pf = { x: 0 }, this.mf = 0, this.It = 0, this.bf = 0 } tweenValue(t, i, n, e, r, h, o, u = !0, a = !0, l = !1) { return c = this, f = null, v = function*() { let c = !1; return this.pf.x = t, this.It = 0, this.setTextByNumber(t, u), a ? this.alignCenter() : l && this.alignRight(), c = yield new Promise((c => { s.kX.to(n, this.pf, { x: i }, this.mf, (() => { this.setTextByNumber(this.pf.x, u), a ? this.alignCenter() : l && this.alignRight(), o && o(), c(!1) }), (() => { if (r && r()) this.setTextByNumber(i, u), a ? this.alignCenter() : l && this.alignRight(), s.kX.stopTweenFor(this.pf), c(!0); else { if (this.It++, e && e > 0) { if (this.It === e && (this.bf = Math.abs(this.pf.x - t)), this.It % e == 0) if (this.bf.toFixed(2).indexOf("0") >= 0) { const t = this.pf.x - Math.random() * this.bf * .1; this.setTextByNumber(t, u) } else this.setTextByNumber(this.pf.x, u) } else 1 === this.It && (this.bf = Math.round(Math.abs(this.pf.x - t))), this.setTextByNumber(this.bf >= 10 && this.bf % 10 == 0 ? this.pf.x - this.It : this.pf.x, u); a ? this.alignCenter() : l && this.alignRight(), h && h() } })) })), new Promise((t => { t(c) })) }, new Promise(((t, i) => { var n = t => { try { e(v.next(t)) } catch (t) { i(t) } }, s = t => { try { e(v.throw(t)) } catch (t) { i(t) } }, e = i => i.done ? t(i.value) : Promise.resolve(i.value).then(n, s); e((v = v.apply(c, f)).next()) })); var c, f, v } getRunningValue() { return this.pf.x } getCurrentFrame() { return this.It } stopTween() { s.kX.stopTweenFor(this.pf) } setStartDelay(t) { this.mf = t } } Reflect; var w = Object.getPrototypeOf, g = Reflect.get; class y extends b { constructor(t) { super(t) } tweenMilestoneValues(t, i, n, s, e, r, h, o, u) { return a = this, l = null, c = function*() { let a = t, l = 0, c = 0, f = 0, v = !1; s && (this.wf = s), e && (this.gf = e), r && (this.yf = r), this.gf(t, 0); for (const t of n) { if (c = t[1], l = t[0], v) { f === n.length - 1 && (this.setTextByNumber(n[n.length - 1][0]), this.alignCenter()), f++, v = !1, a = l; continue } this.setStartDelay(0 === f ? u : 0); const s = { x: a }; yield(d = y.prototype, p = this, m = "tweenValue", g(w(d), m, p)).call(this, s.x, l, c, i, h, (() => { this.yf && this.yf() })).then((t => { if (t) { if (f <= n.length - 1) { let t = l; 0 === this.wf(l) && f < n.length - 1 && (t = n[f + 1][0]), this.gf(a, t) } o && f === n.length - 1 && o(), 0 === this.wf(l) && 1 == _.AppConfig.gameConfig.Popup.BIGWIN_SKIP_ANIM && (v = !0) } else this.gf(a, l); this.alignCenter() })), a = l, f++ } var d, p, m; return Promise.resolve() }, new Promise(((t, i) => { var n = t => { try { e(c.next(t)) } catch (t) { i(t) } }, s = t => { try { e(c.throw(t)) } catch (t) { i(t) } }, e = i => i.done ? t(i.value) : Promise.resolve(i.value).then(n, s); e((c = c.apply(a, l)).next()) })); var a, l, c } } var E = Object.getPrototypeOf, S = Reflect.get; class A extends b { constructor(t, i = null) { super(t, i) } tweenValue(t, i, n, s, e, r, h, o = !0, u) { return a = this, l = null, c = function*() { var a, l, c; return this.stopTween(), (a = A.prototype, l = this, c = "tweenValue", S(E(a), c, l)).call(this, t, i, n, s, e, r, h, !0, o, u), Promise.resolve(!1) }, new Promise(((t, i) => { var n = t => { try { e(c.next(t)) } catch (t) { i(t) } }, s = t => { try { e(c.throw(t)) } catch (t) { i(t) } }, e = i => i.done ? t(i.value) : Promise.resolve(i.value).then(n, s); e((c = c.apply(a, l)).next()) })); var a, l, c } } class T { constructor() { this.Ef = 500, this.container = null, this.Sf = null, this.Af = 0, this.Tf = 0, this.Mf = null, this.Of = null, this.If = null, this.Nf = null, this.Rf = null, this.Pf = 0, this.xf = 0, this.Lf = 0, this.container = new h.W2, this.Mf = new o.j(_.ResourceManager.getAtlasFrame("loading_atlas", "loading_background")), this.Mf.anchor.set(.5), this.container.addChild(this.Mf), this.Sf = this.container.addChild(new h.W2), this.Cf = new o.j(_.ResourceManager.getAtlasFrame("loading_atlas", "loading_progress")), this.Cf.anchor.set(0), this.Cf.position.set(-this.Cf.width / 2, -this.Cf.height / 2), this.Sf.addChild(this.Cf), this.Uf = new o.j(_.ResourceManager.getAtlasFrame("loading_atlas", "loading_progress_mask")), this.Uf.anchor.set(0), this.Uf.position.set(this.Cf.x, this.Cf.y), this.Sf.mask = this.Uf, this.Sf.addChild(this.Uf), this.Af = this.Cf.x, this.Tf = this.Cf.width, this.Of = new o.j(_.ResourceManager.getAtlasFrame("loading_atlas", "loading_progress")), this.Of.anchor.set(.5), this.Sf.addChild(this.Of), this.If = new o.j(_.ResourceManager.getAtlasFrame("loading_atlas", "loading_progress_end")), this.If.anchor.set(1, .5), this.Sf.addChild(this.If), this.Rf = new o.j(_.ResourceManager.getAtlasFrame("loading_atlas", "loading_effect")), this.Rf.anchor.set(1, .5), this.Pf = -this.Mf.width / 2, this.xf = 3 * this.Mf.width, this.Rf.x = this.Pf, this.Sf.addChild(this.Rf), this.Nf = new l.xv(`${_.Localization.getText("TXT_DOWN")}0%`, { fontFamily: "Arial", fontSize: 25, fill: ["#ffffff"] }), this.Nf.anchor.set(.5), this.Nf.y = 50, this.container.addChild(this.Nf) } get progress() { return this.Lf } set progress(t) { this.Lf = t, this.kf(t) } update(t) { this.Rf.x += this.Ef * t, this.Rf.x > this.Pf + this.xf && (this.Rf.x = this.Pf) } reset() { this.Bf(0) } kf(t) { this.Nf.text = `${_.Localization.getText("TXT_DOWN")}${t}%`, this.If.x = this.Af + t * this.Tf / 100, this.Bf(t) } Bf(t) { this.Uf.scale.x = t / 100 } } var M = n(380); var O = (t => (t[t.DEFAULT = 0] = "DEFAULT", t[t.NOTIFICATION = 1] = "NOTIFICATION", t))(O || {}), I = (t => (t[t.LEFT_TO_RIGT = 0] = "LEFT_TO_RIGT", t[t.BOTTON_TO_TOP = 1] = "BOTTON_TO_TOP", t))(I || {}); class N extends _.ResourceAsyncLoader { constructor(t = "CENTER", i = 500, n = 160) { super(), this.Df = !1, this.containerBG = null, this.jf = null, this.container = null, this.animation = 1, this.onPopupOpen = [], this.onPopupClose = [], this.Gf = 0, this.Wf = 500, this.Xf = 160, this.containerBG = new _.AutoAlignContainer(t), this.containerBG.name = this.constructor.name + "_BG", this.containerBG.addResizeListener(this.Vf.bind(this)), this.containerBG.position.set(_.AppConfig.BASE_SCREEN_WIDTH / 2, _.AppConfig.BASE_SCREEN_HEIGHT / 2), this.container = new _.AutoAlignContainer(t), this.container.addResizeListener(this.Vf.bind(this)), this.container.position.set(_.AppConfig.BASE_SCREEN_WIDTH / 2, _.AppConfig.BASE_SCREEN_HEIGHT / 2), this.$f = document.getElementById("waiting-icon"), this.Wf = i, this.Xf = n } initBase() { this.containerBG.visible = !1, this.container.visible = !1 } Yf(t) { this.jf && (this.containerBG.visible = !0, this.jf.alpha = 0, s.kX.to(this.Xf, this.jf, { alpha: 1 }, 0, null, null)), t && (this.Gf = t), 0 === this.Gf && _.AppState.pushState(_.AppState.State.Popup), this.$f && !this.$f.hidden && (this.Df = !0, this.$f.hidden = !0), this.container.visible = !0 } close() { this.container.visible && (this.jf ? s.kX.to(this.Wf, this.jf, { alpha: 0 }, 0, (() => { this.container.visible = !1, this.containerBG.visible = !1, 0 === this.Gf && _.AppState.popState() })) : (this.container.visible = !1, 0 === this.Gf && _.AppState.popState()), this.Df && this.$f && (this.Df = !1, this.$f.hidden = !1)) } Vf(t, i, n, s, e, r, h, o, u) {} setFadeoutTime(t) { this.Wf = t } isOpenning() { return this.container.visible } addListener(t, i) { t && this.onPopupOpen.indexOf(t) < 0 && this.onPopupOpen.push(t), i && this.onPopupClose.indexOf(i) < 0 && this.onPopupClose.push(i) } } class R extends N { constructor() { super(), this.zf = null, this.Kf = [], this.qf = null, this.Zf = 0 } init(t, i) { if (this.jf = new u.TC, this.jf.beginFill(0, .6), this.jf.drawRect(-_.AppConfig.BASE_SCREEN_WIDTH / 2, -_.AppConfig.BASE_SCREEN_HEIGHT / 2, _.AppConfig.BASE_SCREEN_WIDTH, _.AppConfig.MAX_CANVAS_HEIGHT), this.jf.position.y = -_.AppConfig.MAX_CANVAS_MARGIN_Y, this.container.addChild(this.jf), this.jf.interactive = !0, this.zf = new l.xv(t.text, t.style), t.position && this.zf.position.copyFrom(t.position), this.zf.anchor.set(.5), null === _.ResourceManager.getAtlas("ui_atlas").error && 0 === _.LoadingSceneBase.loadingScene.getNumberOfErrors()) { const t = new o.j(_.ResourceManager.getAtlasFrame("ui_atlas", "ui_popup")); t.anchor.set(.5), this.container.addChild(t) } else { const t = new u.TC; t.beginFill(_.AppConfig.gameConfig.Popup.POPUP_BACKGROUND_COLOR, 1), t.drawRoundedRect(-_.AppConfig.gameConfig.Popup.POPUP_WIDTH / 2, -_.AppConfig.gameConfig.Popup.POPUP_HEIGHT / 2, _.AppConfig.gameConfig.Popup.POPUP_WIDTH, _.AppConfig.gameConfig.Popup.POPUP_HEIGHT, 20), this.container.addChild(t) } this.container.zIndex = 10, this.container.addChild(this.zf), M.kc.getInst().sessionExpired && (this.container.addChild(this.zf).y = 0), this.initBase() } open(t, i, n, s = 0) { this.isOpenning() ? s > this.Zf ? (this.Kf.push({ infoText: this.zf.text, confirmText: this.Jf.getText().text, confirmCallback: this.qf, priority: this.Zf }), this.zf.text = t, this.qf = n, this.Jf.getText().text = i, this.Zf = s) : this.Kf.push({ infoText: t, confirmText: i, confirmCallback: n, priority: s }) : (this.zf.text = t, this.Jf && (this.container.removeChild(this.Jf.getContainer()), this.Jf.getContainer().destroy({ children: !0 })), this.Jf = this.createButton(i, n), M.kc.getInst().sessionExpired || this.container.addChild(this.Jf.getContainer()), this.Yf()) } stackPopShowPopup() { if (this.Kf.length) { const t = this.Kf.shift(); this.zf.text = t.infoText, this.qf = t.confirmCallback, this.Jf.getText().text = t.confirmText, this.Zf = t.priority } else this.Jf.setInteractable(!1), this.close() } createButton(t, i) { const n = new l.xv(t, { fontFamily: _.AppConfig.gameConfig.Popup.POPUP_CUSTOM_TEXT_FONT, fontSize: _.AppConfig.gameConfig.Popup.POPUP_BUTTON_TXT_FONT_SIZE, fill: [_.AppConfig.gameConfig.Popup.BUTTON_TEXT_COLOR] }); let s; if (_.ResourceManager.isResourceLoaded("ui_atlas") && 0 === _.LoadingSceneBase.loadingScene.getNumberOfErrors()) s = new o.j(_.ResourceManager.getAtlasFrame("ui_atlas", "ui_button")); else { s = new u.TC, s.beginFill(15512163, 1); const t = { x: -100, y: 100, w: 200, h: 70, r: 8 }; s.drawRoundedRect(t.x, t.y, t.w, t.h, t.r), n.position.set(t.x + t.w / 2, t.y + t.h / 2) } this.qf = i || null; const e = new d({ background: s, text: n }).on("click", (() => { var t; _.SoundManagerBase.getInst().playSfx("SFX_BUTTON_CLICK"), null == (t = this.qf) || t.call(this), this.stackPopShowPopup() })); return _.ResourceManager.isResourceLoaded("ui_atlas") && 0 === _.LoadingSceneBase.loadingScene.getNumberOfErrors() && (e.getContainer().anchor.set(.5), e.getContainer().y = .3 * _.AppConfig.gameConfig.Popup.POPUP_HEIGHT), e } } class P extends N { constructor() { super(), this.Qf = null } lu() { super.initBase(), this.jf = new u.TC, this.jf.beginFill(0, .6), this.jf.drawRect(-_.AppConfig.BASE_SCREEN_WIDTH / 2, -_.AppConfig.BASE_SCREEN_HEIGHT / 2, _.AppConfig.BASE_SCREEN_WIDTH, _.AppConfig.MAX_CANVAS_HEIGHT), this.jf.position.y = -_.AppConfig.MAX_CANVAS_MARGIN_Y, this.container.addChild(this.jf), this.jf.interactive = !0; const t = new o.j(_.ResourceManager.getAtlasFrame("ui_atlas", "ui_popup")); t.anchor.set(.5), this.container.addChild(t), this.Qf = new l.xv("Content", { fontFamily: _.AppConfig.gameConfig.Popup.POPUP_CUSTOM_TEXT_FONT, fontSize: _.AppConfig.gameConfig.Popup.POPUP_TXT_FONT_SIZE, fill: [_.AppConfig.gameConfig.Popup.POPUP_TEXT_COLOR], wordWrap: !0, wordWrapWidth: _.AppConfig.BASE_SCREEN_WIDTH - 300, align: "center", leading: 10 }), this.Qf.anchor.set(.5, 0), this.Qf.position.y = -.25 * _.AppConfig.gameConfig.Popup.POPUP_HEIGHT, this.container.addChild(this.Qf) } open(t, i) { this.Qf.text = i, this.Yf() } } class x extends P { constructor() { super() } init() { super.lu(); const t = new d({ background: new o.j(_.ResourceManager.getAtlasFrame("ui_atlas", "ui_button")), text: new l.xv(_.Localization.getText("CONFIRM"), { fontFamily: _.AppConfig.gameConfig.Popup.POPUP_CUSTOM_TEXT_FONT, fontSize: _.AppConfig.gameConfig.Popup.POPUP_BUTTON_TXT_FONT_SIZE, fill: [_.AppConfig.gameConfig.Popup.BUTTON_TEXT_COLOR] }) }).on("click", (() => { this.tv && this.tv(), this.close() })); t.getContainer().anchor.set(.5), t.getContainer().y = .3 * _.AppConfig.gameConfig.Popup.POPUP_HEIGHT, this.container.addChild(t.getContainer()) } open(t, i, n) { this.tv = n || void 0, super.open(t, i) } } class L extends N { constructor() { super(), this.nv = null, this.sv = !1 } init(t, i) { this.jf = new u.TC, this.jf.beginFill(t.color, t.alpha), this.jf.drawRect(-_.AppConfig.BASE_SCREEN_WIDTH / 2, -_.AppConfig.BASE_SCREEN_HEIGHT / 2, _.AppConfig.BASE_SCREEN_WIDTH, _.AppConfig.MAX_CANVAS_HEIGHT), this.jf.position.y = -_.AppConfig.MAX_CANVAS_MARGIN_Y, this.container.addChild(this.jf), this.nv = new l.xv(i.text, i.style), i.position && this.nv.position.copyFrom(i.position), this.nv.anchor.set(.5), this.container.addChild(this.nv), this.initBase(), this.jf.interactive = !0 } open(t, i, n, e) { return r = this, h = null, o = function*() { this.sv || (this.sv = !0, void 0 !== t && (this.nv.text = t), this.Yf()), this.$f && this.$f.hidden && (this.$f.style.visibility = "visible", this.$f.style.opacity = "1", this.$f.hidden = !1, this.$f.parentElement.hidden = !1); const r = s.b2.setInterval(50, (() => { _.ResourceManager.isAssetReady(e) && (s.b2.clearInterval(r), s.b2.clearTimeout(this.ev), this.close(), n && n(), this.sv = !1) })); i && i > -1 && (this.ev = s.b2.setTimeout(i, (() => { s.b2.clearInterval(r), s.b2.clearTimeout(this.ev), this.close(), this.sv = !1 }))) }, new Promise(((t, i) => { var n = t => { try { e(o.next(t)) } catch (t) { i(t) } }, s = t => { try { e(o.throw(t)) } catch (t) { i(t) } }, e = i => i.done ? t(i.value) : Promise.resolve(i.value).then(n, s); e((o = o.apply(r, h)).next()) })); var r, h, o } close() { super.close(), this.container.visible && this.$f && (this.$f.style.visibility = "hidden", this.$f.style.opacity = "0", this.$f.style.transition = `visibility 0s ${this.Wf/1e3}s, opacity ${this.Wf/1e3}s linear;`, this.$f.addEventListener("transitionend", (() => { this.$f.hidden = !0, this.$f.parentElement.hidden = !0 }))) } } class C extends N { constructor() { super("BOTTOM"), this.rv = null } init(t, i, n) { this.jf = new u.TC, this.jf.beginFill(t.color, t.alpha), this.jf.drawRect(-i.width / 2, -i.height / 2, i.width, i.height), this.container.addChild(this.jf), this.rv = new l.xv(n.text, n.style), n.position && this.rv.position.copyFrom(n.position), this.rv.anchor.set(.5), this.container.addChild(this.rv), this.container.offsetY = -i.height / 2, this.initBase() } open(t, i) { t && (this.rv.text = t), this.Yf(O.DEFAULT), setTimeout((() => { this.close() }), i) } close() { this.jf ? s.kX.to(this.Wf, this.jf, { alpha: 0 }, 0, (() => { this.container.visible = !1, this.Gf === O.DEFAULT && _.AppState.popState() })) : (this.container.visible = !1, this.Gf === O.DEFAULT && _.AppState.popState()) } } class U extends N { constructor() { super(), this.hv = null } init(t, i, n) { this.jf = new u.TC, this.jf.beginFill(0, .6), this.jf.drawRect(-_.AppConfig.BASE_SCREEN_WIDTH / 2, -_.AppConfig.BASE_SCREEN_HEIGHT / 2, _.AppConfig.BASE_SCREEN_WIDTH, _.AppConfig.MAX_CANVAS_HEIGHT), this.jf.position.y = -_.AppConfig.MAX_CANVAS_MARGIN_Y, this.container.addChild(this.jf), this.jf.interactive = !0; const s = new o.j(_.ResourceManager.getAtlasFrame("ui_atlas", "ui_popup")); s.anchor.set(.5), this.container.addChild(s), this.hv = new l.xv(t.text, t.style), t.position && this.hv.position.copyFrom(t.position), this.hv.anchor.set(.5), this.container.addChild(this.hv), this.initBase() } open(t, i, n, s, e) { this.hv.text = t, this.Jf && (this.container.removeChild(this.Jf.getContainer()), this.Jf.getContainer().destroy({ children: !0 })), this.ov && (this.container.removeChild(this.ov.getContainer()), this.ov.getContainer().destroy({ children: !0 })), this.Jf = this.createButton(i, _.AppConfig.gameConfig.Popup.POPUP_WIDTH / 4 - 20, s), this.ov = this.createButton(n, -_.AppConfig.gameConfig.Popup.POPUP_WIDTH / 4 + 20, e), this.container.addChild(this.Jf.getContainer()), this.container.addChild(this.ov.getContainer()), this.Yf() } createButton(t, i, n) { const s = new l.xv(t, { fontFamily: _.AppConfig.gameConfig.Popup.POPUP_CUSTOM_TEXT_FONT, fontSize: _.AppConfig.gameConfig.Popup.POPUP_BUTTON_TXT_FONT_SIZE, fill: [_.AppConfig.gameConfig.Popup.BUTTON_TEXT_COLOR] }), e = new d({ background: new o.j(_.ResourceManager.getAtlasFrame("ui_atlas", "ui_button")), text: s }).on("click", (() => { _.SoundManagerBase.getInst().playSfx("SFX_BUTTON_CLICK"), null == n || n(), this.close() })); return e.getContainer().anchor.set(.5), e.getContainer().x = i, e.getContainer().y = .3 * _.AppConfig.gameConfig.Popup.POPUP_HEIGHT, e } } const k = class { constructor() { this.uiContainer = null, this.popupContainer = null, this.uiContainer = new h.W2 } static set uiMgr(t) { k.uv = t } static get uiMgr() { return k.uv } addPopup(t) { this.popupContainer.addChild(t.containerBG), this.popupContainer.addChild(t.container) } removePopup(t) { this.popupContainer.removeChild(t.containerBG), this.popupContainer.removeChild(t.container) } }; let F = k; F.uv = null; const B = class { constructor() { this.questionPopup = null, this.networkRetryNotification = null, this.networkDisconnectedPopup = null, this.networkWaitingPopup = null, this.loadingResourcePopup = null } static set popupMgr(t) { B.av = t } static get popupMgr() { return B.av } initializePopups() { B.lv(), B.av.cv(), B.av.fv(), B.av.vv() } static getConfirmPopup() { return B.confirmPopup || B.lv(), B.confirmPopup } static lv() { this.confirmPopup || (this.confirmPopup = new R, this.confirmPopup.container.zIndex = 1, this.confirmPopup.init({ text: "", position: new e.E9(0, -50), style: new l.pn({ fontFamily: _.AppConfig.gameConfig.Popup.POPUP_CUSTOM_TEXT_FONT, fontSize: _.AppConfig.gameConfig.Popup.POPUP_TXT_FONT_SIZE, fontWeight: _.AppConfig.gameConfig.Popup.POPUP_TXT_FONT_WEIGHT, fill: "0xFFFFFF", wordWrap: !0, wordWrapWidth: 440, align: "center" }) }, "Ok"), F.uiMgr.addPopup(this.confirmPopup)) } cv() { this.questionPopup = new U, this.questionPopup.init({ text: "", position: new e.E9(0, -50), style: new l.pn({ fontFamily: _.AppConfig.gameConfig.Popup.POPUP_CUSTOM_TEXT_FONT, fontSize: _.AppConfig.gameConfig.Popup.POPUP_TXT_FONT_SIZE, fontWeight: _.AppConfig.gameConfig.Popup.POPUP_TXT_FONT_WEIGHT, fill: "0xFFFFFF", wordWrap: !0, wordWrapWidth: 440, align: "center", leading: 10 }) }, "YES", "NO") } fv() { this.networkDisconnectedPopup = new x, this.networkDisconnectedPopup.init(), this.networkWaitingPopup = new x, this.networkWaitingPopup.init(), this.networkRetryNotification = new C; this.networkRetryNotification.init({ color: 0, alpha: .6 }, { width: _.AppConfig.BASE_SCREEN_WIDTH, height: 100 }, { text: "Network Notification!!!", style: new l.pn({ fontFamily: "Arial", fontSize: 30, fill: ["#ffffff"], dropShadow: !0, dropShadowColor: "#000000", dropShadowBlur: 4, wordWrap: !1 }) }), this.networkRetryNotification.container.offsetY = -200 } vv() { this.loadingResourcePopup = new L, this.loadingResourcePopup.init({ color: 0, alpha: .75 }, { text: "", style: new l.pn({ fontFamily: _.AppConfig.gameConfig.Popup.POPUP_CUSTOM_TEXT_FONT, fontSize: _.AppConfig.gameConfig.Popup.POPUP_TXT_FONT_SIZE + 5, fontWeight: _.AppConfig.gameConfig.Popup.POPUP_TXT_FONT_WEIGHT, fill: "0xffc133", wordWrap: !0, wordWrapWidth: 440, align: "center" }), position: new e.E9(0, 50) }) } onVisibilityChange(t) { t ? this.onResume() : this.onPause() } }; let D = B; D.confirmPopup = null; class j extends N { constructor() { super(), this.dv = !1, this._v = 0, this.pv = null } init(t) { this.jf = new u.TC, this.jf.beginFill(t.color, t.alpha), this.jf.drawRect(-_.AppConfig.BASE_SCREEN_WIDTH / 2, -_.AppConfig.BASE_SCREEN_HEIGHT / 2, _.AppConfig.BASE_SCREEN_WIDTH, _.AppConfig.MAX_CANVAS_HEIGHT), this.jf.position.y = -_.AppConfig.MAX_CANVAS_MARGIN_Y, this.jf.interactive = !0, this.container.addChild(this.jf), this.initBase(), this.jf.addListener("pointerup", this.onPointerUp.bind(this)), this.pv = new s.N1, this.pv.addKey("Space", this.onKeyDown.bind(this)) } open(t, i) { return n = this, e = null, r = function*() { this.Yf(); let n = "", e = null; return this.dv = !1, this._v = 0, new Promise(((r, h) => { const o = () => { clearInterval(e), this.close(), i && i() }, u = setInterval((() => { this._v > 0 && (clearInterval(u), s.b2.clearTimeout(n), n = s.b2.setTimeout(this._v, (() => { o(), r() })), e = setInterval((() => { this.dv && (s.b2.clearTimeout(n), o(), r()) }), 50)) }), 50); n = s.b2.setTimeout(t, (() => { clearInterval(u), o(), r() })) })) }, new Promise(((t, i) => { var s = t => { try { o(r.next(t)) } catch (t) { i(t) } }, h = t => { try { o(r.throw(t)) } catch (t) { i(t) } }, o = i => i.done ? t(i.value) : Promise.resolve(i.value).then(s, h); o((r = r.apply(n, e)).next()) })); var n, e, r } onPointerUp(t) { this.dv = !0 } isTapped() { return this.dv } resetTap() { this.dv = !1 } setNewCloseTime(t) { this._v = t } onKeyDown(t) { if ("Space" === t.code) this.dv = !0 } } class G extends N { constructor(t = "CENTER", i = !0) { super(t), this.mv = 0, this.bv = 0, this.wv = !0, this.gv = !1, this.wv = i } open() { this.Yf(), this.wv ? this.animation === I.BOTTON_TO_TOP ? this.container.position.y = this.yv ? this.yv : _.AppConfig.MAX_CANVAS_HEIGHT : this.container.position.x = this.Ev ? this.Ev : _.AppConfig.BASE_SCREEN_WIDTH : this.container.scale.set(0, 0), this.gv = !1, this.flyShow(!0) } close() { this.flyShow(!1) } Vf(t, i, n, s, e, r, h, o, u) { this.mv = this.container.position.y } flyShow(t) { if (t) this.onPopupOpen.length > 0 && this.onPopupOpen.forEach((t => { t.start && t.start() })); else { if (this.gv) return; this.gv = !0, this.onPopupClose.length > 0 && this.onPopupClose.forEach((t => { t.start && t.start() })) } const i = _.AppConfig.gameConfig.Popup.SHOW_POPUP_TIME; if (this.wv) if (this.animation === I.BOTTON_TO_TOP) { s.kX.to(i, this.container.position, { y: t ? this.mv : this.yv ? this.yv : _.AppConfig.MAX_CANVAS_HEIGHT }, 0, (() => { t ? this.onPopupOpen.length > 0 && this.onPopupOpen.forEach((t => { t.end && t.end() })) : (this.onPopupClose.length > 0 && this.onPopupClose.forEach((t => { t.end && t.end() })), super.close()) })) } else { s.kX.to(i, this.container.position, { x: (t ? this.bv : this.Ev ? this.Ev : _.AppConfig.BASE_SCREEN_WIDTH) + _.AppConfig.BASE_SCREEN_WIDTH / 2 }, 0, (() => { t ? this.onPopupOpen.length > 0 && this.onPopupOpen.forEach((t => { t.end && t.end() })) : (this.onPopupClose.length > 0 && this.onPopupClose.forEach((t => { t.end && t.end() })), super.close()) })) } else { const n = t ? 1 : 0; s.kX.easeTo(i, this.container.scale, { x: n, y: n }, 0, (() => { t ? this.onPopupOpen.length > 0 && this.onPopupOpen.forEach((t => { t.end && t.end() })) : (this.onPopupClose.length > 0 && this.onPopupClose.forEach((t => { t.end && t.end() })), super.close()) }), null, t ? s.oY.Back.Out : s.oY.Back.In) } } } }, 4665: (t, i, n) => { "use strict"; n.d(i, { SI: () => T, JK: () => k, oY: () => o, zW: () => A, fb: () => M, N1: () => d, X2: () => P, S9: () => L, RZ: () => w, ip: () => I, b2: () => h, x_: () => _, kX: () => a, qM: () => O, cQ: () => v }); var s = n(229), e = n(3930); const r = class { static onUpdate(t) { const i = t / e.X.TARGET_FPMS; r.Sv(i), r.Av(i) } static setTimeout(t, i) { if (-1 === t) return; const n = v.shortUuidv4(); return this.Tv.set(n, { func: i, time: t }), n } static clearTimeout(t) { this.Tv.delete(t) } static Sv(t) { const i = []; this.Tv.forEach(((n, s) => { n.time -= t, n.time < 0 && (n.func(), i.push(s)) })); for (let t = i.length - 1; t >= 0; t--) this.Tv.delete(i[t]) } static setInterval(t, i) { const n = v.shortUuidv4(); return this.Mv.set(n, { func: i, delay: t, time: 0 }), n } static clearInterval(t) { this.Mv.delete(t) } static Av(t) { this.Mv.forEach(((i, n, s) => { i.time += t, i.time > i.delay && (i.func(), i.time -= i.delay) })) } }; let h = r; h.Tv = new Map, h.Mv = new Map; const o = { Linear: { None: t => t }, Quadratic: { In: t => t * t, Out: t => t * (2 - t), InOut: t => (t *= 2) < 1 ? .5 * t * t : -.5 * (--t * (t - 2) - 1) }, Cubic: { In: t => t * t * t, Out: t => --t * t * t + 1, InOut: t => (t *= 2) < 1 ? .5 * t * t * t : .5 * ((t -= 2) * t * t + 2) }, Quartic: { In: t => t * t * t * t, Out: t => 1 - --t * t * t * t, InOut: t => (t *= 2) < 1 ? .5 * t * t * t * t : -.5 * ((t -= 2) * t * t * t - 2) }, Quintic: { In: t => t * t * t * t * t, Out: t => --t * t * t * t * t + 1, InOut: t => (t *= 2) < 1 ? .5 * t * t * t * t * t : .5 * ((t -= 2) * t * t * t * t + 2) }, Sinusoidal: { In: t => 1 - Math.cos(t * Math.PI / 2), Out: t => Math.sin(t * Math.PI / 2), InOut: t => .5 * (1 - Math.cos(Math.PI * t)) }, Exponential: { In: t => 0 === t ? 0 : Math.pow(1024, t - 1), Out: t => 1 === t ? 1 : 1 - Math.pow(2, -10 * t), InOut: t => 0 === t ? 0 : 1 === t ? 1 : (t *= 2) < 1 ? .5 * Math.pow(1024, t - 1) : .5 * (2 - Math.pow(2, -10 * (t - 1))) }, Circular: { In: t => 1 - Math.sqrt(1 - t * t), Out: t => Math.sqrt(1 - --t * t), InOut: t => (t *= 2) < 1 ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1) }, Elastic: { In: t => { let i = 0, n = .1; return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1, i = .1) : i = .4 * Math.asin(1 / n) / (2 * Math.PI), -n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - i) * (2 * Math.PI) / .4)) }, Out: t => { let i = 0, n = .1; return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1, i = .1) : i = .4 * Math.asin(1 / n) / (2 * Math.PI), n * Math.pow(2, -10 * t) * Math.sin((t - i) * (2 * Math.PI) / .4) + 1) }, InOut: t => { let i = 0, n = .1; const s = .4; return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1, i = .1) : i = s * Math.asin(1 / n) / (2 * Math.PI), (t *= 2) < 1 ? n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - i) * (2 * Math.PI) / s) * -.5 : n * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - i) * (2 * Math.PI) / s) * .5 + 1) } }, Back: { In: t => { const i = 1.70158; return t * t * ((i + 1) * t - i) }, Out: t => { const i = 1.70158; return --t * t * ((i + 1) * t + i) + 1 }, Out33: t => { const i = .94431; return --t * t * ((i + 1) * t + i) + 1 }, Out66: t => { const i = 1.34996; return --t * t * ((i + 1) * t + i) + 1 }, InOut: t => { const i = 2.5949095; return (t *= 2) < 1 ? t * t * ((i + 1) * t - i) * .5 : .5 * ((t -= 2) * t * ((i + 1) * t + i) + 2) } }, Bounce: { In: t => 1 - o.Bounce.Out(1 - t), Out: t => { const i = 7.5625, n = 2.75; return t < 1 / n ? i * t * t : t < 2 / n ? i * (t -= 1.5 / n) * t + .75 : t < 2.5 / n ? i * (t -= 2.25 / n) * t + .9375 : i * (t -= 2.625 / n) * t + .984375 }, InOut: t => t < .5 ? .5 * o.Bounce.In(2 * t) : .5 * o.Bounce.Out(2 * t - 1) + .5, SymbolOut1: t => t < .3146 ? 10 * t * t : 1.5 * (t - .65) * (t - .65) + .83, SymbolOut2: t => t < .2581 ? 15 * t * t : t < .6988 ? 1.2 * (t - .48) * (t - .48) + .94 : 1.2 * (t - .85) * (t - .85) + .97, SymbolOut3: t => t < .2581 ? 15 * t * t : t < .5758 ? 1.7 * (t - .42) * (t - .42) + .955 : t < .8294 ? 1.7 * (t - .7) * (t - .7) + .97 : 1.7 * (t - .9) * (t - .9) + .99, SymbolOutDefault: t => t < .5672 ? 3.11 * t * t : t < .8294 ? 1.7 * (t - .7) * (t - .7) + .97 : 1.7 * (t - .9) * (t - .9) + .99, Up: t => { const i = 7.5625, n = 2.75; return t < 1 / n ? i * t * t : t < 2 / n ? i * (t -= 1.5 / n) * t + .75 : t < 2.5 / n ? i * (t -= 2.25 / n) * t + .9375 : i * (t -= 2.625 / n) * t + .984375 } } }, u = class { static onUpdate(t) { this.Ov(t / e.X.TARGET_FPMS) } static Ov(t) { for (const [i, n] of this.Iv) n.delay && n.delay > 0 ? n.delay -= t : (n.duration = Math.max(0, n.duration - t), n.duration <= 0 ? (n.values.forEach((t => { n.target[t.key] = t.targetNumber })), n.updatedEvent && n.updatedEvent(), n.finishedEvent && n.finishedEvent(), this.Iv.delete(i)) : (n.values.forEach((i => { if (void 0 === i.offsetPerMS && (i.offsetPerMS = (i.targetNumber - n.target[i.key]) / n.duration), i.tweenTime && n.easeFunc) { const t = n.easeFunc((i.tweenTime - n.duration) / i.tweenTime); n.target[i.key] = i.origin + (i.targetNumber - i.origin) * t } else n.target[i.key] += i.offsetPerMS * t })), n.updatedEvent && n.updatedEvent())) } static to(t, i, n, s, e, r) { const h = []; Object.keys(n).forEach(((e, r) => { h.push({ key: e, origin: i[e], targetNumber: n[e], offsetPerMS: s && s > 0 ? void 0 : (n[e] - i[e]) / t }) })), u.add(i, t, h, s || 0, e, r) } static easeTo(t, i, n, s, e, r, h) { const o = []; Object.keys(n).forEach(((e, r) => { o.push({ key: e, origin: i[e], targetNumber: n[e], offsetPerMS: s && s > 0 ? void 0 : (n[e] - i[e]) / t, tweenTime: t }) })), u.add(i, t, o, s || 0, e, r, h) } static by(t, i, n, s, e, r) { const h = []; Object.keys(n).forEach(((e, r) => { h.push({ key: e, origin: i[e], targetNumber: i[e] + n[e], offsetPerMS: s && s > 0 ? void 0 : (n[e] - i[e]) / t }) })), u.add(i, t, h, s || 0, e, r) } static stopAll() { this.Iv.clear() } static stopTweenFor(t) { for (const [i, n] of this.Iv) n.target === t && this.Iv.delete(i) } static stopTweenAndCallBackFor(t) { for (const [i, n] of this.Iv) n.target === t && (n.values.forEach((t => { n.target[t.key] = t.targetNumber })), n.updatedEvent && n.updatedEvent(), n.finishedEvent && n.finishedEvent(), this.Iv.delete(i)) } static add(t, i, n, s, e, r, h = null) { const o = v.shortUuidv4(); this.Iv.set(o, { target: t, duration: i, values: n, delay: s, finishedEvent: e, updatedEvent: r, easeFunc: h }) } }; let a = u; a.Iv = new Map; var l = n(204), c = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); const f = class { static parseURLParams(t) { let i, n, s, e, r = t.indexOf("?") + 1, h = t.indexOf("#") + 1 || t.length + 1, o = t.slice(r, h - 1), u = o.replace(/\+/g, " ").split("&"), a = {}; if (o === t || "" === o) return a; for (i = 0; i < u.length; i++) e = u[i].split("=", 2), n = decodeURIComponent(e[0]), s = decodeURIComponent(e[1]), a[n] = 2 === e.length ? s : null; return a } static getAbsoluteURLOnWeb(t) { const i = document.createElement("a"); return i.href = t, i.href } static isUrlExists(t) { const i = new XMLHttpRequest; return i.open("HEAD", t, !1), i.send(), 404 !== i.status } static checkUrlExists(t) { return c(this, null, (function*() { return yield fetch(t, { method: "HEAD" }).then((t => !!t.ok)) })) } static convertToMoneyFormat(t) { return null === this.Nv && (this.Nv = new Intl.NumberFormat("en", { currency: "USD", maximumFractionDigits: 2, minimumFractionDigits: 2 })), this.Nv.format(t) } static convertTimeUnixToDate(t, i = !1) { const n = new Date(t); return n.getHours() + ":" + ("0" + n.getMinutes()).substr(-2) + ":" + ("0" + n.getSeconds()).substr(-2) + (i ? " " : "\n") + ("0" + n.getUTCDate()).substr(-2) + "/" + ("0" + (n.getMonth() + 1)).substr(-2) + "/" + n.getUTCFullYear() } static getDateFromTime(t, i = !1) { const n = new Date(t), s = ("0" + n.getUTCDate()).substr(-2), e = ("0" + (n.getMonth() + 1)).substr(-2), r = n.getUTCFullYear(); return `${s}/${e}` + (i ? "/" + r : "") } static formatDate(t) { return t.toLocaleString("en-CA", { year: "numeric", month: "2-digit", day: "2-digit" }) } static getTimeUnixDate(t) { const i = new Date(t); return i.getHours() + ":" + ("0" + i.getMinutes()).substr(-2) + ":" + ("0" + i.getSeconds()).substr(-2) } static getDateUnixDate(t) { const i = new Date(t); return ("0" + i.getUTCDate()).substr(-2) + "/" + ("0" + (i.getMonth() + 1)).substr(-2) + "/" + i.getUTCFullYear() } static shortUuidv4() { return "xxxxxxxx".replace(/[xy]/g, (function(t) { const i = 16 * Math.random() | 0; return ("x" == t ? i : 3 & i | 8).toString(16) })) } static clamp(t, i, n) { return t > n ? n : t < i ? i : t } static isOnMobile() { return /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|(hpw|web)OS|Opera M(obi|ini)/i.test(navigator.userAgent) } static isIosAgent() { return /iP(hone|ad)/i.test(navigator.userAgent) } static getBrowser() { let t, i = navigator.userAgent, n = i.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; return /trident/i.test(n[1]) ? (t = /\brv[ :]+(\d+)/g.exec(i) || [], { name: "IE", version: t[1] || "" }) : "Chrome" === n[1] && (t = i.match(/\bOPR|Edge\/(\d+)/), null !== t) ? { name: "Opera", version: t[1] } : (n = n[2] ? [n[1], n[2]] : [navigator.appName, navigator.appVersion, "-?"], null !== (t = i.match(/version\/(\d+)/i)) && n.splice(1, 1, t[1]), { name: n[0], version: n[1] }) } static getDistance(t, i) { const n = t.x - i.x, s = t.y - i.y; return Math.sqrt(n * n + s * s) } static degreeToRadian(t) { return t * Math.PI / 180 } static radianToDegree(t) { return 180 * t / Math.PI } static angleBetweenTwoPoint(t, i) { const n = Math.atan2(i.y - t.y, i.x - t.x); return f.radianToDegree(n) } static getPointInCircleByAngle(t, i) { const n = f.degreeToRadian(i); return { x: t * Math.sin(n), y: t * Math.cos(n) } } static generateLineEquation(t, i) { if (t.x - i.x == 0) return { a: 0, b: -1, c: t.x }; const n = (t.y - i.y) / (t.x - i.x); return { a: n, b: -1, c: -n * t.x + t.y } } static collisionOfLineAndCircle(t, i, n, s) { const e = Math.abs(t.a * i + t.b * n + t.c) / Math.sqrt(t.a * t.a + t.b * t.b); return { colType: s === e ? "TOUNCH" : s > e ? "INTERSECT" : "OUTSIDE", distance: e } } static rayCast(t, i, n, e) { const r = t.x - i.x, h = (t.y - i.y) / r, o = (t.x * i.y - i.x * t.y) / r; if (h != o && 0 != h && 0 != o) { const t = (-(o * n.x + -h * n.y) - h * o) / (h * h - o); return new s.E9(t, h * t + o) } return null } static shortFormatMoneyNumber(t) { let i = "", n = t; if (t >= 1e3) { let s = t / 1e3; s >= 1e3 ? (s = Math.floor(s / 100), s /= 10, s >= 100 && (s = Math.floor(s)), n = s, i = "M") : (s >= 100 ? s = Math.floor(s) : (s = Math.floor(t / 100), s /= 10), n = s, i = "K") } return `${n}${i}` } static cloneArray(t) { if (0 === t.length) return []; const i = []; for (let n = 0, s = t.length; n < s; n++) i.push(t[n] instanceof Array ? this.cloneArray(t[n]) : t[n]); return i } static randomRange(t, i, n = !1) { const s = i - t; let e = t + Math.random() * s; return n && (e = Math.round(e)), e } static cartesianToPolar(t) { const [i, n] = [t.x, t.y], e = Math.atan2(n, i); return new s.E9(this.getLength(t), e) } static getLength(t) { return Math.sqrt(t.x * t.x + t.y + t.y) } static getAnimDurationMS(t, i) { return 1e3 * t.skeleton.data.findAnimation(i).duration } static isDeveloper() { const t = window.location.hostname, i = window.location.port, n = -1 !== t.search("192.168") && "808" === i.substring(0, 3); return !("localhost" !== t && !n) } static copyToClipboard(t) { if (window.clipboardData && window.clipboardData.setData) return window.clipboardData.setData("Text", t); if (!document.queryCommandSupported || !document.queryCommandSupported("copy")) return !1; { const i = document.createElement("textarea"); if (i.textContent = t, i.style.position = "fixed", document.body.appendChild(i), f.isIosAgent()) { i.contentEditable = "false", i.readOnly = !0; const t = document.createRange(); t.selectNodeContents(i); const n = window.getSelection(); n.removeAllRanges(), n.addRange(t), i.setSelectionRange(0, 999999) } else i.select(); try { return document.execCommand("copy") } catch (t) { return !1 } finally { document.body.removeChild(i) } } } static round(t, i = 2) { return Math.round((t + Number.EPSILON) * 10 ** i) / 10 ** i } static delay(t) { return c(this, null, (function*() { return new Promise((i => { h.setTimeout(t, (() => { i() })) })) })) } static getPointFrom(t, i, n) { const e = new s.E9(0, 0), r = i * (Math.PI / 180); return e.x = t.x + n * Math.cos(r), e.y = t.y + n * Math.sin(r), e } static formatName(t, i = 16, n = "...") { if (t.length > i) { return t.substring(0, i).trim() + n } return t.trim() } static Rv(t, i = 100, n) { t.visible = !0, t.alpha = 0, a.to(i, t, { alpha: 1 }, 0, (() => { n && n() })) } static Pv(t, i = 100, n, s = !0) { a.to(i, t, { alpha: 0 }, 0, (() => { t.visible = !1, s && (t.alpha = 1), n && n() })) } static Cv(t, i = 100, n = null, s = 1.2) { a.to(i, t.scale, { x: s, y: s }, 0, (() => { a.to(i, t.scale, { x: 1, y: 1 }, 0, (() => { n && n() }), null) }), null) } static Uv(t, i = 2) { return Math.round((t + Number.EPSILON) * 10 ** i) / 10 ** i } static kv(t) { const i = new RegExp("^(https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^s]{2,}|www\\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^s]{2,}|https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9]+\\.[^s]{2,}|www\\.[a-zA-Z0-9]+\\.[^s]{2,})"); return !!t.match(i) } static Fv(t, i, n) { const s = `${i}`.length; let e; n.sort(((t, i) => t.digits - i.digits)).forEach((t => { t.digits <= s && (e = t) })), t.setAnimateTextSize(e.fontSize), t.position.copyFrom(e.pos) } static fitFontSizeByCharacter(t, i, n) { const s = `${i}`.length; let e; n.sort(((t, i) => t.digits - i.digits)).forEach((t => { t.digits <= s && (e = t) })), t.style ? t.style.fontSize = e.fontSize : t.fontSize = e.fontSize, t.position.copyFrom(e.pos) } static updateGameSetting(t, i, n) { if (!0 === l.AppConfig.SKIP_SOUND_COOKIE_SAVE && "sound" === t) return; const s = new Date; s.setTime(s.getTime() + 24 * n * 60 * 60 * 1e3); const e = "expires=" + s.toUTCString(), r = "sound" === t ? t + "=" : l.ConfigManager.getInst().gameCode + "" + t + "="; document.cookie = r + i + ";" + e + ";path=/" } static getGameSetting(t) { if (!0 === l.AppConfig.SKIP_SOUND_COOKIE_SAVE && "sound" === t) return ""; const i = "sound" === t ? t + "=" : l.ConfigManager.getInst().gameCode + "" + t + "=", n = document.cookie.split(";"); for (let t = 0; t < n.length; t++) { let s = n[t]; for (; " " === s.charAt(0);) s = s.substring(1); if (0 === s.indexOf(i)) return s.substring(i.length, s.length) } return "" } static cleanSpine(t) { t.state.clearTracks(), t.skeleton.setToSetupPose() } static diceWithWinPercentage(t) { return 100 * Math.random() < t } }; let v = f; v.gameUtils = null, v.Nv = null; class d { constructor() { this.Dv = [], this.addEventListeners() } addEventListeners() { window.addEventListener("keydown", this.jv.bind(this), !1), window.addEventListener("keyup", this.Gv.bind(this), !1) } removeEventListeners() { window.removeEventListener("keydown", this.jv), window.removeEventListener("keyup", this.Gv) } addKey(t, i = void 0, n = void 0) { const s = { keyCode: t, isDown: !1, isUp: !0, press: i, release: n }; return this.Dv.push(s), s } removeKey(t) { const i = this.Dv.indexOf(t); - 1 !== i && this.Dv.splice(i, 1) } jv(t) { for (let i = 0; i < this.Dv.length; i++) { const n = this.Dv[i]; if (t.code === n.keyCode) { n.isUp && n.press && n.press(t), n.isDown = !0, n.isUp = !1, t.preventDefault(); break } } } Gv(t) { for (let i = 0; i < this.Dv.length; i++) { const n = this.Dv[i]; if (t.code === n.keyCode) { n.isDown && n.release && n.release(t), n.isDown = !1, n.isUp = !0, t.preventDefault(); break } } } } class _ { constructor(t, i) { this.Wv = [], this.Hv = !1, this.Ro = t, this.Xv = i; const n = t / 1e3 * i; for (let t = 0; t < n; t++) this.Wv.push(2 * Math.random() - 1) } getAmplitude(t) { const i = t / 1e3 * this.Xv, n = Math.floor(i), s = n + 1, e = this.Vv(t); return (this.$v(n) + (i - n) * (this.$v(s) - this.$v(n))) * e } Vv(t) { return t >= this.Ro ? 0 : (this.Ro - t) / this.Ro } $v(t) { return t >= this.Wv.length ? 0 : this.Wv[t] } } var p = n(7738), m = n.n(p); const b = class { constructor(t, i = !0) { this.Yv = !1, this.zv = ["log", "error", "warn", "debug"], this.Kv = ['"jackpot-updated"', '"jud"', '"jackpot-win"', '"JPA"', '"wallet-updated"', "my wallet update", "Out of pool size of symbol", ": ping", ": pong"], this.qv = !0, this.Zv = t || this.zv, this.lu(this.Zv), i && this.startCapture(!1) } static getInst() { return b.vu || (b.vu = new b), b.vu } lu(t) { if (console.everything) return; console.everything = [], window.onerror = (t, i, n, s, e) => { const r = [t, i, n, s, e.message, e.stack]; return console.everything.push({ type: "Exception", timeStamp: b.Jv(), value: r }), v.isDeveloper() || b.Qv || (b.Qv = !0, this.saveLogFile()), !1 }, window.onunhandledrejection = t => { const i = t.reason, n = [i.message, i.stack]; console.everything.push({ type: "UnhandledRejection", timeStamp: b.Jv(), value: n }) }, window.onmessageerror = t => { console.everything.push({ type: "MessageError", timeStamp: b.Jv(), value: t }) }, window.onrejectionhandled = t => { console.everything.push({ type: "RejectionHandled", timeStamp: b.Jv(), value: t }) }, t.forEach((t => { console[t] = this.td(t) })); const i = new URL(window.location.href), n = i.searchParams.has("a") || i.searchParams.has("all"); this.qv = !n } td(t) { const i = console[t].bind(console); return function() { b.nd && console.everything.push({ type: t, timeStamp: b.Jv(), value: Array.from(arguments) }), i.apply(console, arguments) } } static Jv() { const t = this.sd ? "UTC" : "Asia/Ho_Chi_Minh"; return (new Date).toLocaleString("sv", { timeZone: t }).replace(/\-/g, "").replace(/\:/g, "").replace(/ /g, "_") } startCapture(t = !0) { b.nd = !0, t && console.everything.push({ type: "command", timeStamp: b.Jv(), value: "Start Record" }) } stopCapture(t = !0) { b.nd = !1, t && console.everything.push({ type: "command", timeStamp: b.Jv(), value: "Stop Record" }) } ed() { let t = ""; return console.everything.forEach((i => { const n = i.type, s = i.value; let e = ""; s instanceof Array ? (e = "", s.forEach(((t, i) => { let n; n = "object" == typeof t ? JSON.stringify(t) : t.toString(), e += n, i > 0 && i < s.length - 1 && (e += ", ") }))) : e = JSON.stringify(s); let r = !1; this.qv && this.Kv.forEach((t => { e.indexOf(t) > -1 && (r = !0) })), r || (t += n.toUpperCase() + " - " + e + "\n") })), t } rd() { return JSON.stringify(console.everything, null, 2) } clear() { console.everything.length = 0 } size() { return console.everything && console.everything.length || 0 } saveLogFile() { if (this.size() > 0) { const t = this.Yv ? this.rd() : this.ed(), i = `${"Mahjong Phoenix".trim()}_${b.Jv()}.txt`, n = new Blob([t], { type: "application/json" }); m().saveAs(n, i) } } }; let w = b; w.nd = !1, w.Qv = !1, w.sd = !1; var g = n(2877), y = n(6359); const E = class { constructor() { this.hd = !1, this.od = "Z,Y,S,T,2,3,A,X,2,6,A,Z,Z,2,A,3,2,3,T,4", this.ud = 75, this.ad = 35, this.ld = 10, this.fd = 78666, this.vd = .5, this.dd = 8, this._d = 14, this.pd = [], this.md = !1, this.bd = 0, this.wd = 0, this.gd = 60, this.yd = 0, this.Ed = 60, this.Sd = 0, this.Ad = 0, this.Td = !1, this.Md = !1, this.Od = 0, this.Id = 0, this.cheatContainer = new l.AutoAlignContainer("TOP"), this.lu(), l.MainApp.getInst().app.ticker.add(this.onUpdate, this) } static getInst() { return E.vu || (E.vu = new E), E.vu } lu() { this.Nd = this.Rd(!1), this.Pd = this.xd("CHEAT"), this.Nd.addChild(this.Pd), this.Nd.alpha = this.vd, this.Nd.position.set(l.AppConfig.BASE_SCREEN_WIDTH - this.ud / 2 - 2, this.ad / 2), this.Pd.position.set(this.ud / 2, this.ad / 2), this.cheatContainer.addChild(this.Nd), this.Nd.on("pointerdown", this.Ld.bind(this)); const t = new y.pn({ fontFamily: "Arial", fontSize: 27, fontWeight: "bold", fill: [16711680] }); this.Ud || (this.Ud = new y.xv("DrawCall:60", t), this.Ud.anchor.set(0, 0), this.Ud.position.set(2, 30), this.Ud.visible = !1, this.cheatContainer.addChild(this.Ud)), this.kd = new y.xv("View: 0", t), this.kd.anchor.set(0, 0), this.kd.position.set(2, 60), this.kd.visible = !1, this.cheatContainer.addChild(this.kd); const i = l.MainApp.getInst().app.renderer, n = i.gl.drawElements; i.gl.drawElements = (...t) => { n.call(i.gl, ...t), this.Od++ }, this.addCustomToggleCheatButton("FPS", (() => { this.Fd = !this.Fd, this.Fd ? (this.Bd || (this.Bd = new y.xv("FPS:60", t), this.Bd.anchor.set(0, 0), this.Bd.position.set(2, 0), this.cheatContainer.addChild(this.Bd)), this.Bd.visible = !0) : (this.Bd.visible = !1, this.bd = 0, this.wd = 0, this.gd = 60, this.yd = 0, this.Ed = 60, this.Sd = 0, this.Ad = 0) })), this.addCustomToggleCheatButton("DrawCall", (() => { this.Td = !this.Td, this.Ud.visible = !!this.Td })), this.hd && this.addCustomToggleCheatButton("Viewport", (() => { this.Md = !this.Md, this.kd.visible = !!this.Md })); const s = new URL(window.location.href); if (s.searchParams.has("l") || s.searchParams.has("log") || !v.isDeveloper()) { const t = w.getInst(); this.addCustomCheatButton("Logs", (() => { 0 === t.size() ? alert("Empty Logs!") : t.saveLogFile() })) } } Ld() { this.md = !this.md, this.md ? (this.Pd.text = "X", this.Pd.style.fontSize = 20, this.pd.forEach((t => { t.visible = !0 }))) : (this.Pd.text = "CHEAT", this.Pd.style.fontSize = this._d, this.pd.forEach((t => { t.visible = !1 }))) } Dd() { const t = new g.TC; return t.lineStyle(2, 16706423, 1), t.beginFill(this.fd), t.drawRect(0, 0, this.ud, this.ad), t.endFill(), t.alpha = this.vd, t.pivot.set(this.ud / 2, this.ad / 2), t.interactive = !0, t.buttonMode = !0, t } Rd(t) { const i = new g.TC; return t ? i.lineStyle(5, 16711680, 1) : i.lineStyle(2, 16706423, 1), i.beginFill(this.fd), i.drawRoundedRect(0, 0, this.ud, this.ad, this.dd), i.endFill(), i.alpha = this.vd, i.pivot.set(this.ud / 2, this.ad / 2), i.interactive = !0, i.buttonMode = !0, i } xd(t) { const i = new y.pn({ fontFamily: "Arial", fontSize: this._d, fill: "#ffffff" }), n = new y.xv(t, i); return n.anchor.set(.5), n } onUpdate(t) { this.Fd && this.Bd && (this.bd += t / e.X.TARGET_FPMS / 1e3, this.wd++, this.bd > 1 && (this.Sd++, this.bd -= 1, this.gd = Math.min(this.gd, this.wd), this.yd = Math.max(this.yd, this.wd), this.Ad += this.wd, this.Ed = Math.floor(this.Ad / this.Sd), this.Bd.text = `FPS:${this.wd}, avg:${this.Ed}, min:${this.gd}, max:${this.yd}`, this.wd = 0)), this.Td && (this.Id = Math.max(this.Id, this.Od), this.Ud.text = `Draw:${this.Od}, max:${this.Id}`), this.Od = 0 } addCustomCheatButton(t, i, n = !0) { const s = n ? this.Rd(!1) : this.Dd(); s.position.set(l.AppConfig.BASE_SCREEN_WIDTH - this.ud / 2 - 2, this.Nd.y + this.ad * (this.pd.length + 1) + (this.pd.length + 1) * this.ld); const e = this.xd(t); s.addChild(e), e.position.set(this.ud / 2, this.ad / 2), s.on("pointerdown", i), s.visible = this.md, this.pd.push(s), this.cheatContainer.addChild(s) } addCustomToggleCheatButton(t, i) { const n = this.Rd(!1); n.position.set(l.AppConfig.BASE_SCREEN_WIDTH - this.ud / 2 - 2, this.Nd.y + this.ad * (this.pd.length + 1) + (this.pd.length + 1) * this.ld); const s = this.Rd(!0); s.visible = !1, s.position.set(this.ud / 2, this.ad / 2); const e = this.xd(t); n.addChild(s), n.addChild(e), e.position.set(this.ud / 2, this.ad / 2), n.on("pointerdown", (() => { s.visible = !s.visible, i() })), n.visible = this.md, this.pd.push(n), this.cheatContainer.addChild(n) } setResolutionInfo(t, i, n, s, e, r, h) { const o = this.Uv(9 * (s / n), 1); this.kd.text = `Game: ${this.Uv(t)}x${this.Uv(i)}, R: ${Math.round(n)}x${Math.round(s)}, S: ${this.Uv(e)}, FR: ${o}/9` } Uv(t, i = 2) { return Math.round((t + Number.EPSILON) * 10 ** i) / 10 ** i } }; E.vu = null; var S = n(6335); class A { static eventNames() { return this.jd.eventNames() } static listeners(t) { return this.jd.listeners(t) } static listenerCount(t) { return this.jd.listenerCount(t) } static emit(t, ...i) { return this.jd.emit(t, ...i) } static on(t, i, n) { return this.jd.on(t, i, n), this } static addListener(t, i, n) { return this.jd.addListener(t, i, n), this } static once(t, i, n) { return this.jd.once(t, i, n), this } static removeListener(t, i, n, s) { return this.jd.removeListener(t, i, n), this } static off(t, i, n, s) { return this.jd.off(t, i, n), this } static removeAllListeners(t) { return this.jd.removeAllListeners(t), this } static destroy() { this.jd && delete this.jd } } A.jd = new S.EventEmitter; var T = (t => (t.BRAND_LOGO_HIDED = "BRAND_LOGO_HIDED", t))(T || {}), M = (t => (t.LOAD_AUDIO = "LOAD_AUDIO", t))(M || {}), O = (t => (t.OPEN = "OPEN", t.CLOSE = "CLOSE", t.CLICK_START = "CLICK_START", t.CLICK_CANCEL = "CLICK_CANCEL", t.CLICK_CASH_OUT = "CLICK_CASH_OUT", t.CLICK_CHANGE_LEVEL = "CLICK_CHANGE_LEVEL", t.ENABLE_TURBO = "ENABLE_TURBO", t.TOTAL_WIN_END = "TOTAL_WIN_END", t.LOCK_SPIN_PANE = "LOCK_SPIN_PANE", t.CHANGE_BET = "CHANGE_BET", t.CHANGE_VOLUME = "CHANGE_VOLUME", t.TOGGLE_SOUND = "TOGGLE_SOUND", t.CLOSE_POPUP_WIN = "CLOSE_POPUP_WIN", t.OPEN_QUICK_PICK = "OPEN_QUICK_PICK", t.OPEN_MINES_SELECT = "OPEN_MINES_SELECT", t.SELECT_NUMBER_PICK = "SELECT_NUMBER_PICK", t.SPIN_SESSION_END = "SPIN_SESSION_END", t.SPIN_START = "SPIN_START", t.SPIN_STOP = "SPIN_STOP", t.ACTIVE_FREE_GAMES = "ACTIVE_FREE_GAMES", t.DEACTIVE_FREE_GAMES = "DEACTIVE_FREE_GAMES", t.ACTIVE_AUTO_SPIN = "ACTIVE_AUTO_SPIN", t.DEACTIVE_AUTO_SPIN = "DEACTIVE_AUTO_SPIN", t.UPDATE_TURBO_TOGGLE = "UPDATE_TURBO_TOGGLE", t.ACTIVE_FREE_MINIGAMES = "ACTIVE_FREE_MINIGAMES", t.UPDATE_FREE_MINIGAMES = "UPDATE_FREE_MINIGAMES", t.DEACTIVE_FREE_MINIGAMES = "DEACTIVE_FREE_MINIGAMES", t.RECEIVED_SPIN_DATA = "RECEIVED_SPIN_DATA", t.ERROR_PUSHED_CODE = "ERROR_PUSHED_CODE", t.COMBINATION_ANIMATED = "COMBINATION_ANIMATED", t.ACTIVE_BONUS_GAMES = "ACTIVE_BONUS_GAMES", t.DEACTIVE_BONUS_GAMES = "DEACTIVE_BONUS_GAMES", t.ACTIVE_NEAR_WIN = "ACTIVE_NEAR_WIN", t.LOCK_SPIN_ACTION = "LOCK_SPIN_ACTION", t.ON_COMEIN_ANIM_STARTED = "on-comein-anim-started", t.ON_STOP_AUTO_SPIN = "on-stop-auto-spin", t))(O || {}), I = (t => (t.RECEIVE_CONFIG = "RECEIVE_CONFIG", t.RECEIVE_MATCH_DATA = "RECEIVE_MATCH_DATA", t.WS_CONNECTED = "CONNECTED", t.BALANCE_UPDATED = "BALANCE_UPDATED", t.RESUME_MATCH = "RESUME_MATCH", t.MULTIPLIER_UPDATE = "MULTIPLIER_UPDATE", t.ON_WS_CONNECTED = "on-ws-connected", t))(I || {}), N = n(941); class R extends N.mh { constructor(t) { super(new N.ZA(t, !0)) } destroy() { super.destroy({ children: !0 }) } } var P = (t => (t[t.ReelSymbolsFXBottom = 0] = "ReelSymbolsFXBottom", t[t.ReelSymbolsFront = 1] = "ReelSymbolsFront", t[t.ReelSymbolsFXFront = 2] = "ReelSymbolsFXFront", t[t.ReelSymbolsFront2 = 3] = "ReelSymbolsFront2", t[t.ReelSymbolsFrontAboveNearWin = 4] = "ReelSymbolsFrontAboveNearWin", t[t.ReelSymbolsFXTop = 5] = "ReelSymbolsFXTop", t[t.ReelSymbolsTop = 6] = "ReelSymbolsTop", t[t.UITop = 7] = "UITop", t))(P || {}); const x = class { static get Initiated() { return x.initiated } static Initiate() { const t = !x.initiated; return t && (x.initiated = !0, x.initiateComponents()), t } static Get(t) { return x.layers[t] } static Set(t, i) { const n = x.initiated && !!x.layers[i]; return n && (t.layer = x.layers[i]), n } static Reset(t) { t.layer = null } static SetSymbolLayer(t, i) { const n = Object.entries(P).filter((t => t[0] === (i || "ReelSymbols"))).map((t => t[1]))[0]; return x.Set(t, n) } static initiateComponents() { x.initiateComponent(0), x.initiateComponent(1), x.initiateComponent(2), x.initiateComponent(3), x.initiateComponent(4), x.initiateComponent(5), x.initiateComponent(6), x.initiateComponent(7) } static initiateComponent(t, i) { const n = new R(t); n.name = P[t], x.layers[t] = n } }; let L = x; L.layers = [], L.initiated = !1; var C = n(380); const U = class { static Gd(t) { return t >= 48 && t <= 57 } static currencyFormatAmountWithK(t, i = !1) { let n = "", s = t; return this.Wd && (s = this.covertAmountToCredit(t)), n = s < 1e3 ? U.currencyFormatAmount(t, i) : s / 1e3 + "k", n } static currencyFormatAmount(t, i = !1) { const n = this.Hd(t); let s = ""; const e = this.Wd ? this.Vd : this.$d; for (let t = n.length - 1; t >= 0; t--) { const i = n.charCodeAt(t), r = e.charCodeAt(e.length - s.length - 1); let h = ""; 46 === r ? (this.Gd(i) && (h = String.fromCharCode(i)), h += ".") : h = 44 === r && this.Gd(i) ? String.fromCharCode(i) + "," : String.fromCharCode(i), s = h + s } if (this.shouldDisplayCurrencySign && !i) { s = C.kc.getInst().currencySign + s } return s } static getCurrencyText() { let t = ""; if (this.shouldDisplayCurrencySign) { t = C.kc.getInst().currencySign + " " } return t } static get shouldDisplayCurrencySign() { return !this.isDiplayFormatCredit && C.kc.getInst().currencySign } static changeDisplayFormat() { this.Wd = !this.Wd, this.Yd() } static covertAmountToCredit(t) { const i = C.kc.getInst().creditExchangeRate; return parseFloat(t.toFixed(2)) / i } static covertCreditToAmount(t) { return t * C.kc.getInst().creditExchangeRate } static Hd(t) { return this.Wd ? this.covertAmountToCredit(t).toFixed(0) : t.toFixed(2) } static get isDiplayFormatCredit() { return this.Wd } static Yd() {} static setShowCredit(t) { this.Wd = "credit" === t } }; let k = U; k.$d = "***,***,***,***,***,***.**", k.Vd = "***,***,***,***,***,***,***", k.Wd = !1 }, 4654: () => {} }, __webpack_module_cache__ = {}; function __webpack_require__(t) { var i = __webpack_module_cache__[t]; if (void 0 !== i) return i.exports; var n = __webpack_module_cache__[t] = { id: t, loaded: !1, exports: {} }; return __webpack_modules__[t].call(n.exports, n, n.exports, __webpack_require__), n.loaded = !0, n.exports } __webpack_require__.n = t => { var i = t && t.zd ? () => t.default : () => t; return __webpack_require__.d(i, { a: i }), i }, __webpack_require__.d = (t, i) => { for (var n in i) __webpack_require__.o(i, n) && !__webpack_require__.o(t, n) && Object.defineProperty(t, n, { enumerable: !0, get: i[n] }) }, __webpack_require__.g = function() { if ("object" == typeof globalThis) return globalThis; try { return this || new Function("return this")() } catch (t) { if ("object" == typeof window) return window } }(), __webpack_require__.o = (t, i) => Object.prototype.hasOwnProperty.call(t, i), __webpack_require__.r = t => { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "zd", { value: !0 }) }, __webpack_require__.nmd = t => (t.paths = [], t.children || (t.children = []), t); var __webpack_exports__ = {}; return (() => { "use strict"; __webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, { GameApp: () => We }); var t = {}; __webpack_require__.r(t), __webpack_require__.d(t, { VERSION: () => N, after: () => rn, all: () => Tn, allKeys: () => jt, any: () => Mn, assign: () => ei, before: () => hn, bind: () => $i, bindAll: () => Ki, chain: () => Wi, chunk: () => us, clone: () => ui, collect: () => wn, compact: () => Zn, compose: () => en, constant: () => Et, contains: () => On, countBy: () => Dn, create: () => oi, debounce: () => tn, default: () => cs, defaults: () => ri, defer: () => Ji, delay: () => Zi, detect: () => pn, difference: () => Qn, drop: () => Kn, each: () => bn, escape: () => Ri, every: () => Tn, extend: () => si, extendOwn: () => ei, filter: () => Sn, find: () => pn, findIndex: () => ln, findKey: () => un, findLastIndex: () => cn, findWhere: () => mn, first: () => zn, flatten: () => Jn, foldl: () => yn, foldr: () => En, forEach: () => bn, functions: () => ii, get: () => vi, groupBy: () => Fn, has: () => di, head: () => zn, identity: () => _i, include: () => On, includes: () => On, indexBy: () => Bn, indexOf: () => dn, initial: () => Yn, inject: () => yn, intersection: () => ss, invert: () => ti, invoke: () => In, isArguments: () => wt, isArray: () => pt, isArrayBuffer: () => ut, isBoolean: () => Q, isDataView: () => _t, isDate: () => et, isElement: () => tt, isEmpty: () => xt, isEqual: () => Dt, isError: () => ht, isFinite: () => gt, isFunction: () => lt, isMap: () => zt, isMatch: () => Lt, isNaN: () => yt, isNull: () => Z, isNumber: () => st, isObject: () => q, isRegExp: () => rt, isSet: () => qt, isString: () => nt, isSymbol: () => ot, isTypedArray: () => It, isUndefined: () => J, isWeakMap: () => Kt, isWeakSet: () => Zt, iteratee: () => gi, keys: () => Pt, last: () => qn, lastIndexOf: () => _n, map: () => wn, mapObject: () => Ei, matcher: () => pi, matches: () => pi, max: () => Pn, memoize: () => qi, methods: () => ii, min: () => xn, mixin: () => ls, negate: () => sn, noop: () => Si, now: () => Oi, object: () => hs, omit: () => $n, once: () => on, pairs: () => Qt, partial: () => Vi, partition: () => jn, pick: () => Vn, pluck: () => Nn, property: () => mi, propertyOf: () => Ai, random: () => Mi, range: () => os, reduce: () => yn, reduceRight: () => En, reject: () => An, rest: () => Kn, restArguments: () => K, result: () => Di, sample: () => Ln, select: () => Sn, shuffle: () => Cn, size: () => Hn, some: () => Mn, sortBy: () => Un, sortedIndex: () => fn, tail: () => Kn, take: () => zn, tap: () => ai, template: () => Bi, templateSettings: () => xi, throttle: () => Qi, times: () => Ti, toArray: () => Wn, toPath: () => li, transpose: () => es, unescape: () => Pi, union: () => ns, uniq: () => is, unique: () => is, uniqueId: () => Gi, unzip: () => es, values: () => Jt, where: () => Rn, without: () => ts, wrap: () => nn, zip: () => rs }); var i = __webpack_require__(4665), n = __webpack_require__(204); class s extends n.SoundManagerBase { static getInst() { return globalThis[this.Tl] || (globalThis[this.Tl] = new s, delete globalThis[this.Ml]), globalThis[this.Tl] } constructor() { super() } playSfx(t, i, n, s, e, r) { return super.playSfx(t, i, n, s, e, r) } playMusic(t, i, n, s, e, r) { return super.playMusic(t, i, n, s, e, r) } isPlaying(t, i) { return super.isPlaying(t, i) } resume(t, i) { return super.resume(t, i) } pause(t) { return super.pause(t) } stop(t) { return super.stop(t) } rate(t, i) { return super.rate(t, i) } fade(t, i, n, s, e, r, h, o) { return super.fade(t, i, n, s, e, r, h, o) } } globalThis[s.Ml] = s; var e = __webpack_require__(4936), r = __webpack_require__(229), h = (__webpack_require__(4433), __webpack_require__(3930)), o = __webpack_require__(8759), u = (__webpack_require__(6335), __webpack_require__(6480)), a = __webpack_require__(4577), l = (__webpack_require__(4062), __webpack_require__(6002), __webpack_require__(1735)), c = __webpack_require__(5849), f = __webpack_require__(5700), v = __webpack_require__(2877), d = __webpack_require__(3767), _ = (__webpack_require__(5868), __webpack_require__(4258)), p = __webpack_require__(4431), m = __webpack_require__(6359), b = __webpack_require__(8971), w = (__webpack_require__(5273), __webpack_require__(941), __webpack_require__(5182)); l.kC.setExtensionXhrType("skel", l.kC.XHR_RESPONSE_TYPE.BUFFER); var g = function() { function t() {} return t.prototype.genMiddleware = function() { var t = this; return { use: function(i, n) { if (!i.data) return n(); var s = /*! * @pixi-spine/loader-base - v3.1.2 * Compiled Tue, 10 Jan 2023 14:17:32 UTC * * @pixi-spine/loader-base is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license * * Copyright 2019-2020, Ivan Igorevich Popelyshev , All Rights Reserved */ function(t) { return t.type === l.kC.TYPE.JSON }(i) && i.data.bones, r = function(t) { return t.xhrType === l.kC.XHR_RESPONSE_TYPE.BUFFER }(i) && ("skel" === i.extension || i.metadata && i.metadata.spineMetadata); if (!s && !r) return n(); var h = null, o = i.data; s ? h = t.createJsonParser() : (h = t.createBinaryParser(), i.data instanceof ArrayBuffer && (o = new Uint8Array(i.data))); var u = i.metadata || {}, a = u ? u.spineSkeletonScale : null; a && (h.scale = a); var c = u.spineAtlas; if (!1 === c) return n(); if (c && c.pages) return t.parseData(i, h, c, o), n(); var f = u.spineAtlasSuffix || ".atlas", v = i.url, d = v.indexOf("?"); d > 0 && (v = v.substr(0, d)), v = v.substr(0, v.lastIndexOf(".")) + f, u.spineAtlasFile && (v = u.spineAtlasFile), v = v.replace(this.baseUrl, ""); var _ = { crossOrigin: i.crossOrigin, xhrType: l.kC.XHR_RESPONSE_TYPE.TEXT, metadata: u.spineMetadata || null, parentResource: i }, p = { crossOrigin: i.crossOrigin, metadata: u.imageMetadata || null, parentResource: i }, m = i.url.substr(0, i.url.lastIndexOf("/") + 1); m = m.replace(this.baseUrl, ""); var b = u.imageNamePrefix || i.name + "_atlas_page_", g = u.images ? y(u.images) : u.image ? y({ default: u.image }) : u.imageLoader ? u.imageLoader(this, b, m, p) : function(t, i, n, s) { n && n.lastIndexOf("/") !== n.length - 1 && (n += "/"); return function(r, h) { var o = i + r, u = n + r, a = t.resources[o]; if (a) { var l = function() { h(a.texture.baseTexture) }; a.texture ? l() : a.onAfterMiddleware.add(l) } else t.add(o, u, s, (function(t) { t.error ? h(null) : (r.indexOf("-pma.") >= 0 && (t.texture.baseTexture.alphaMode = e.iw.PMA), h(t.texture.baseTexture)) })) } }(this, b, m, p); function E(s) { new w.Yi(s, g, (function(s) { s && t.parseData(i, h, s, o), n() })) } u.atlasRawData ? E(u.atlasRawData) : this.add(i.name + "_atlas", v, _, (function(t) { t.error ? n() : E(t.data) })) } } }, t }(); function y(t) { return function(i, n) { var s = t[i] || t.default; n(s && s.baseTexture ? s.baseTexture : s) } } var E = __webpack_require__(80), S = function(t, i) { return (S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]) })(t, i) }; var A = function(t) { function i() { return null !== t && t.apply(this, arguments) || this } return function(t, i) { if ("function" != typeof i && null !== i) throw new TypeError("Class extends value " + String(i) + " is not a constructor or null"); function n() { this.constructor = t } S(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) }(i, t), i.prototype.createBinaryParser = function() { return new E.HD(null) }, i.prototype.createJsonParser = function() { return new E.CE(null) }, i.prototype.parseData = function(t, i, n, s) { var e = i; e.attachmentLoader = new E.N0(n), t.spineData = e.readSkeletonData(s), t.spineAtlas = n }, i.registerLoaderPlugin = function() { l.aN.registerPlugin(i) }, i.use = (new i).genMiddleware().use, i }(g); a.Th.registerPlugin("batch", a.Bv), a.Th.registerPlugin("interaction", b.bx), f.M.registerPlugin(l.LP), f.M.registerPlugin(o.Sb), l.aN.registerPlugin(_.o), l.aN.registerPlugin(p.vl), A.registerLoaderPlugin(); const T = class {}; let M = T; M.GAME_CODE = "sMahPhe", M.SLOT_TYPE = n.SlotType.WAY_GAME, M.HAS_HORIZONTAL_REEL = !1, M.BE_RESPONSE_FORMAT = n.ResponseFormat.MEGA_SYMBOL, M.GameBoard = { CLIPPING_MASK_TYPE: n.MaskType.BOARD, ALWAYS_ENABLE_CLIPPING: !0, SYMBOL_HEIGHT: 158, SYMBOL_WIDTH: 140, SYMBOL_HORIZONTAL_HEIGHT: 158, SYMBOL_HORIZONTAL_WIDTH: 140, GAME_TABLE_FORMAT: [7, 7, 7, 7, 7], GAME_TABLE_RESUME_FORMAT: [7, 7, 7, 7, 7], NUMBER_OF_REELS: 5, NUMBER_SYMBOL_DISPLAYED_ON_REEL: 7, MAX_NUMBER_SYMBOL_PER_REEL: 9, REEL_POSITION_OFFSET: [-70, 0, 0, 0, -70], FONT_SIZE_GRAND: 30, FONT_SIZE_MAJOR: 30, FONT_SIZE_MINOR: 30, FONT_SIZE_CUSTOM: 30, SLOT_MACHINE_POS: new r.E9(0, -21), BOARD_CLIPPING_OFFSET_Y: 400, BOARD_CLIPPING_CUT_TOP: 30, BOARD_CLIPPING_CUT_BOTTOM: 200, HORIZONTAL_CLIPPING_X: 0, HORIZONTAL_CLIPPING_Y: 5, HORIZONTAL_CLIPPING_WIDTH: 0, HORIZONTAL_CLIPPING_HEIGHT: 2, BOARD_REAL_SYMBOL_MAPPING: [ [!1, !1, !0, !0, !0, !0, !1], [!1, !0, !0, !0, !0, !0, !1], [!1, !0, !0, !0, !0, !0, !1], [!1, !0, !0, !0, !0, !0, !1], [!1, !1, !0, !0, !0, !0, !1] ], BOARD_ACTIVE_IDLE_ON_FAKE_SYMBOL: !0, SYMBOL_DIM_COLOR: 10855845, CANVAS_BACKGROUND_COLOR: 15720926, NEAR_WIN_POS_X: 140, NEAR_WIN_POS_Y: 158 }, M.SlotStyle = { SYMBOL_SPIN_MAX_SPEED: 4e3, SYMBOL_SPIN_MIN_SPEED: 2600, SPIN_EASING_BACK_START_NORMAL: !0, SPIN_ACCELERATION_NORMAL: 100, SYMBOL_SPIN_TURBO_SPEED: 4e3, SYMBOL_SPIN_TIME_TURBO: 300, SYMBOL_SPIN_TIME_TURBO_NEAR_WIN: 300, SPIN_EASING_BACK_START_TURBO: !0, USE_FORCE_RESULT_TURBO: !0, SYMBOL_SPIN_BOUND_MAGIC_NUMBER: 2.0751, SYMBOL_SPIN_BOUND_TIME: 220, SYMBOL_SHAKE_WAIT_FREQUENCY: 14, SYMBOL_SHAKE_WAIT_AMPLITUDE: 2, SYMBOL_SPIN_BOUND: 40, SYMBOL_SPIN_BOUND_FRAME: 5, SYMBOL_RESPIN_BOUND_TIME: 100, BOUNCE_LEVEL_NORMAL: 2, BOUNCE_LEVEL_RESPIN: 1, BOUNCE_LEVEL_EASING_STOP_SPIN: 1, USE_BOUNCE_EASING_STOP_SPIN: !0, USE_BOUNCE_EASING_STOP_SPIN_QUADTIME: 50, USE_BACK_EASING_STOP_SPIN: !1, USE_EASING_STOP_SPIN: !1, TIME_EASING_STOPPING: 150, NO_WAIT_TIME_EASING_STOPPING: !1, DISABLE_TIME_EASING_STOPPING: !1, SYMBOL_SPIN_TIME_NORMAL: 800, SYMBOL_SPIN_TIME_CASCADE: 120, SYMBOL_DROPPING_TIME_CASCADE: 150, SYMBOL_RESPIN_UPGRADE_TIME: 250, SYMBOL_RESPIN_TRANSFORM_TIME: 450, SYMBOL_RAND_UPGRADE_TIME: 70, SYMBOL_SPIN_TIME_NEAR_WIN_START: 1500, SYMBOL_SPIN_NEAR_WIN_SPEED: 300, SYMBOL_SPIN_TIME_NEAR_WIN_END: 1500, SYMBOL_SPIN_NEAR_WIN_LENGHT: 9, SYMBOL_SPIN_TIME_DELAY: 100, SHOW_REWARD_TIME: 2e3, SPEED_UP_CASCADE_TIME: .5, CASCADE_HAS_SYMBOL_DROP_EFFECT: !0, CASCADE_RANDOM_DELAY_BETWEEN_REEL: 150, REEL_CASCADE_DELAY_TIME: [0, 0, 0, 0, 0, 0, 0], REEL_SPIN_DELAYS: [50, 150, 250, 350, 450, 550, 30], REELS_STOP_TIMING: [50, 150, 250, 350, 450], CASCADE_SPIN_DELAYS: [100, 100, 100, 100, 100, 100, 100], REEL_NEAR_WIN_CAN_ACTIVE: [0, 1, 2, 3, 4, 5], REEL_EXPAND_TIME: 300, MENU_EXPAND_TIME: 200, FADED_DIM_TIME: 160, SYMBOL_FADED_DIM_TIME: 50, TIME_INTRO_MAIN_GAME: 100, PLAY_REEL_STOP_SFX_ONCE: !1 }, M.Menu = { MENU_TXT_FONT_SIZE: 50, MENU_NORMAL_TXT_FONT_SIZE: 25, MENU_OPTION_TEXT_SIZE: 20, TITLE_FONT_SIZE: 24, SPIN_PANEL_HEIGHT: 200 }, M.Popup = { SHOW_POPUP_TIME: 500, POPUP_HEIGHT: 397, POPUP_WIDTH: 597, POPUP_BACKGROUND_COLOR: 3158076, POPUP_TEXT_COLOR: 16777215, POPUP_TEXT_HIGHLIGHT_COLOR: 15512163, POPUP_TEXT_FONT: "Calibri", POPUP_CUSTOM_TEXT_FONT: "Arial", POPUP_TXT_FONT_SIZE: 27, POPUP_TXT_FONT_WEIGHT: "normal", POPUP_BUTTON_TXT_FONT_SIZE: 27, BUTTON_TEXT_COLOR: "0x000000", RUN_BIGWIN_NUMBER_DELAY_TIME: 150, BIGWIN_MILESTONES: [ [10, 10], [20, 15], [30, 20], [40, 25] ], MIN_TIME_OF_LAST_BIGWIN_MILESTONE: 1, MAX_TIME_OF_LAST_BIGWIN_MILESTONE: 100, TIME_BIGWIN_COUNT_MONEY: 8200, TIME_TOTALWIN_COUNT_MONEY: 5100, BIGWIN_AINM_IDS: [ ["bigwin_in", "bigwin_loop", "bigwin_out"], ["megawin_in", "megawin_loop", "megawin_out"], ["supermegawin_in", "supermegawin_loop", "supermegawin_out"], ["ultramegawin_in", "ultramegawin_loop", "ultramegawin_out"] ], BIGWIN_COLOR_AINM_IDS: ["bw_flare", "mw_flare", "smw_flare", "umw_flare"], BIGWIN_SOUND_IDS: ["SFX_WINS_SERIES_HIT_BIG_WIN", "SFX_WINS_SERIES_HIT_MEGA_WIN", "SFX_WINS_SERIES_HIT_SUP_MEGA_WIN", "SFX_WINS_SERIES_HIT_ULTRA_MEGA_WIN"], LAST_WAITING_TIME_BIGWIN_POPUP: 500, RUN_TOTALWIN_NUMBER_DELAY_TIME: 500, TOTALWIN_POPUP_ANIM_PLAY_TIME: 6500, LAST_WAITING_TIME_TOTALWIN_POPUP: 3e3, BIGWIN_SKIP_ANIM: !1 }, M.Font = { FONT_SYMBOL_INFO_LEFT: "sym_info", FONT_SYMBOL_INFO_RIGHT: "sym_info2", FONT_WAYS: "bmpfont01", FONT_WIN: "bmpfont02", FONT_REMAIN: "bmpfont03", FONT_MULTIPLIER: "bmpfont04", FONT_TRANSCENE_IN: "bmpfont01", FONT_TRANSCENE_OUT: "bmpfont06", FONT_TOTAL_WIN: "bmpfont05", FONT_IN_BUY_FEATURE: "bmpfont08", FONT_RETRIGGER: "bmpfont09", FONT_BIGWIN: "bmpfont10", WIN_CHARACTER: "#", TOTAL_WIN_CHARACTER: "^", FEATURE_WIN_CHARACTER: "&" }, M.Control = { USE_STORE_BLEND_CACHE_DIM_SYMBOL: !1, USE_TOUCH_SCREEN_TO_ENTER_GAME: !1, AUTO_SPIN_ARRANGE_TIME: 500, AUTO_SPIN_ARRANGE_TIME_NO_COMBINE: 200, AUTO_SPIN_DELAY_FREE_GAME_TIME: 500, JP_UPDATED_TIME: 500, SPIN_BUTTON_ROTATE_SPEED: 15, SPIN_BUTTON_WAITING_SPEED: 2, MONEY_BIGWIN_COUNTING_DELAY_FRAME: 1, STEP_UP_MULTIPLER_NORMAL: 1, STEP_UP_MULTIPLER_FREEGAME: 2, DEFAULT_START_MULTIPLER_NORMAL: 1, DEFAULT_START_MULTIPLER_FREEGAME: 2, HINT_LONG_TEXT_DISPLAY_TIME: 2e3, HINT_LONG_TEXT_WAIT_TO_NEXT_HINT: 1e3, HINT_SHORT_TEXT_DISPLAY_TIME: 4e3, BALANCE_RUNNING_TIME: 500, WIN_AMOUNT_PANEL_RUNNING_TIME: 500, FADEIN_MAIN_GAME_MUSIC: 1500, PAYLINE_TOTALWIN_COUNT_CONDITION: 5, PAYLINE_TOTALWIN_COUNT_TIME: 1400, LEVEL_BAR_PAYLINE: [3, 5] }, M.BE_BASE_TIME = "GMT+8", M.BonusType = { MINOR: 1, MAJOR: 2, GRAND: 3, CUSTOM: 4 }, M.NUM_NORMAL_SYMBOL_TYPE = 8, M.NUM_SYMBOL_TYPE = 11, M.SymbolType = { SymbolNull: "0", SymbolBonus: "9", SymbolScatter: "11", SymbolWild: "1", BrokenSymbol: "99", isOnTop: t => t === T.SymbolType.SymbolWild }, M.SymbolList = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"], M.SymbolRandomList = ["2", "3", "4", "5", "6", "7", "8", "9", "10"], M.SymbolLevelList = [4], M.SpecSymbol = [], M.SpecSymbolIdle = [], M.SymbolSize = [4], M.SymbolEffWin = ["5", "6", "7", "8"], M.SymbolWithoutBlurFrame = [], M.PayTable = { K: [0, 0, 0, 0], 2: [5, 10, 20], 3: [8, 15, 25], 4: [12, 20, 30], 5: [18, 25, 35], 6: [25, 30, 40], S: [40, 50, 70], T: [50, 60, 85], X: [60, 75, 100], Y: [70, 90, 125], Z: [80, 110, 150] }, M.DefaultMegaMatrix = [{ megaSymbol: [ [{ s: 5, r: 4, f: 0, m: 0 }, { s: 8, r: 4, f: 0, m: 0 }, { s: 10, r: 4, f: 0, m: 0 }, { s: 10, r: 4, f: 0, m: 0 }, { s: 8, r: 4, f: 0, m: 0 }, { s: 10, r: 4, f: 0, m: 0 }, { s: 10, r: 4, f: 0, m: 0 }], [{ s: 7, r: 4, f: 0, m: 0 }, { s: 10, r: 4, f: 0, m: 0 }, { s: 3, r: 4, f: 0, m: 0 }, { s: 4, r: 4, f: 2, m: 0 }, { s: 4, r: 4, f: 0, m: 0 }, { s: 9, r: 4, f: 0, m: 0 }, { s: 8, r: 4, f: 0, m: 0 }], [{ s: 8, r: 4, f: 0, m: 0 }, { s: 9, r: 4, f: 0, m: 0 }, { s: 6, r: 4, f: 0, m: 0 }, { s: 8, r: 4, f: 0, m: 0 }, { s: 9, r: 4, f: 0, m: 0 }, { s: 9, r: 4, f: 0, m: 0 }, { s: 4, r: 4, f: 2, m: 0 }], [{ s: 2, r: 4, f: 0, m: 0 }, { s: 2, r: 4, f: 0, m: 0 }, { s: 4, r: 4, f: 0, m: 0 }, { s: 7, r: 4, f: 0, m: 0 }, { s: 11, r: 4, f: 0, m: 0 }, { s: 7, r: 4, f: 0, m: 0 }, { s: 7, r: 4, f: 0, m: 0 }], [{ s: 10, r: 4, f: 0, m: 0 }, { s: 4, r: 4, f: 0, m: 0 }, { s: 5, r: 4, f: 0, m: 0 }, { s: 5, r: 4, f: 0, m: 0 }, { s: 2, r: 4, f: 0, m: 0 }, { s: 3, r: 4, f: 0, m: 0 }, { s: 2, r: 4, f: 0, m: 0 }] ] }], M.DefaultLineMatrix = [{ symbol: [8, 7, 9, 7, 3, 3, 2, 6, 9, 9, 7, 8, 3, 2, 8] }], M.RuntimeData = { isBackFromFreegame: !1, currentFGWin: 0, last_fgAccumTotalWin: 0, isTestAcc: !1 }, M.CachePool = { INITIAL_POOL_SIZE_PER_SYMBOL: 4, MAX_POOL_SIZE_PER_SYMBOL: 6 }, M.Sound = { SCATTER_SOUND_DELAY: -1, WILD_SOUND_DELAY: -1 }; var O = __webpack_require__(2445), I = __webpack_require__(380), N = "1.13.1", R = "object" == typeof self && self.self === self && self || "object" == typeof global && global.global === global && global || Function("return this")() || {}, P = Array.prototype, x = Object.prototype, L = "undefined" != typeof Symbol ? Symbol.prototype : null, C = P.push, U = P.slice, k = x.toString, F = x.hasOwnProperty, B = "undefined" != typeof ArrayBuffer, D = "undefined" != typeof DataView, j = Array.isArray, G = Object.keys, W = Object.create, H = B && ArrayBuffer.isView, X = isNaN, V = isFinite, $ = !{ toString: null }.propertyIsEnumerable("toString"), Y = ["valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"], z = Math.pow(2, 53) - 1; function K(t, i) { return i = null == i ? t.length - 1 : +i, function() { for (var n = Math.max(arguments.length - i, 0), s = Array(n), e = 0; e < n; e++) s[e] = arguments[e + i]; switch (i) { case 0: return t.call(this, s); case 1: return t.call(this, arguments[0], s); case 2: return t.call(this, arguments[0], arguments[1], s) } var r = Array(i + 1); for (e = 0; e < i; e++) r[e] = arguments[e]; return r[i] = s, t.apply(this, r) } } function q(t) { var i = typeof t; return "function" === i || "object" === i && !!t } function Z(t) { return null === t } function J(t) { return void 0 === t } function Q(t) { return !0 === t || !1 === t || "[object Boolean]" === k.call(t) } function tt(t) { return !(!t || 1 !== t.nodeType) } function it(t) { var i = "[object " + t + "]"; return function(t) { return k.call(t) === i } } const nt = it("String"), st = it("Number"), et = it("Date"), rt = it("RegExp"), ht = it("Error"), ot = it("Symbol"), ut = it("ArrayBuffer"); var at = it("Function"); "object" != typeof Int8Array && "function" != typeof(R.document && R.document.childNodes) && (at = function(t) { return "function" == typeof t || !1 }); const lt = at, ct = it("Object"); var ft = D && ct(new DataView(new ArrayBuffer(8))), vt = "undefined" != typeof Map && ct(new Map), dt = it("DataView"); const _t = ft ? function(t) { return null != t && lt(t.getInt8) && ut(t.buffer) } : dt, pt = j || it("Array"); function mt(t, i) { return null != t && F.call(t, i) } var bt = it("Arguments"); ! function() { bt(arguments) || (bt = function(t) { return mt(t, "callee") }) }(); const wt = bt; function gt(t) { return !ot(t) && V(t) && !isNaN(parseFloat(t)) } function yt(t) { return st(t) && X(t) } function Et(t) { return function() { return t } } function St(t) { return function(i) { var n = t(i); return "number" == typeof n && n >= 0 && n <= z } } function At(t) { return function(i) { return null == i ? void 0 : i[t] } } const Tt = At("byteLength"), Mt = St(Tt); var Ot = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/; const It = B ? function(t) { return H ? H(t) && !_t(t) : Mt(t) && Ot.test(k.call(t)) } : Et(!1), Nt = At("length"); function Rt(t, i) { i = function(t) { for (var i = {}, n = t.length, s = 0; s < n; ++s) i[t[s]] = !0; return { contains: function(t) { return i[t] }, push: function(n) { return i[n] = !0, t.push(n) } } }(i); var n = Y.length, s = t.constructor, e = lt(s) && s.prototype || x, r = "constructor"; for (mt(t, r) && !i.contains(r) && i.push(r); n--;)(r = Y[n]) in t && t[r] !== e[r] && !i.contains(r) && i.push(r) } function Pt(t) { if (!q(t)) return []; if (G) return G(t); var i = []; for (var n in t) mt(t, n) && i.push(n); return $ && Rt(t, i), i } function xt(t) { if (null == t) return !0; var i = Nt(t); return "number" == typeof i && (pt(t) || nt(t) || wt(t)) ? 0 === i : 0 === Nt(Pt(t)) } function Lt(t, i) { var n = Pt(i), s = n.length; if (null == t) return !s; for (var e = Object(t), r = 0; r < s; r++) { var h = n[r]; if (i[h] !== e[h] || !(h in e)) return !1 } return !0 } function Ct(t) { return t instanceof Ct ? t : this instanceof Ct ? void(this.Kd = t) : new Ct(t) } function Ut(t) { return new Uint8Array(t.buffer || t, t.byteOffset || 0, Tt(t)) } Ct.VERSION = N, Ct.prototype.valueOf = Ct.prototype.toJSON = Ct.prototype.value = function() { return this.Kd }, Ct.prototype.toString = function() { return String(this.Kd) }; var kt = "[object DataView]"; function Ft(t, i, n, s) { if (t === i) return 0 !== t || 1 / t == 1 / i; if (null == t || null == i) return !1; if (t != t) return i != i; var e = typeof t; return ("function" === e || "object" === e || "object" == typeof i) && Bt(t, i, n, s) } function Bt(t, i, n, s) { t instanceof Ct && (t = t.Kd), i instanceof Ct && (i = i.Kd); var e = k.call(t); if (e !== k.call(i)) return !1; if (ft && "[object Object]" == e && _t(t)) { if (!_t(i)) return !1; e = kt } switch (e) { case "[object RegExp]": case "[object String]": return "" + t == "" + i; case "[object Number]": return +t != +t ? +i != +i : 0 == +t ? 1 / +t == 1 / i : +t == +i; case "[object Date]": case "[object Boolean]": return +t == +i; case "[object Symbol]": return L.valueOf.call(t) === L.valueOf.call(i); case "[object ArrayBuffer]": case kt: return Bt(Ut(t), Ut(i), n, s) } var r = "[object Array]" === e; if (!r && It(t)) { if (Tt(t) !== Tt(i)) return !1; if (t.buffer === i.buffer && t.byteOffset === i.byteOffset) return !0; r = !0 } if (!r) { if ("object" != typeof t || "object" != typeof i) return !1; var h = t.constructor, o = i.constructor; if (h !== o && !(lt(h) && h instanceof h && lt(o) && o instanceof o) && "constructor" in t && "constructor" in i) return !1 } s = s || []; for (var u = (n = n || []).length; u--;) if (n[u] === t) return s[u] === i; if (n.push(t), s.push(i), r) { if ((u = t.length) !== i.length) return !1; for (; u--;) if (!Ft(t[u], i[u], n, s)) return !1 } else { var a, l = Pt(t); if (u = l.length, Pt(i).length !== u) return !1; for (; u--;) if (!mt(i, a = l[u]) || !Ft(t[a], i[a], n, s)) return !1 } return n.pop(), s.pop(), !0 } function Dt(t, i) { return Ft(t, i) } function jt(t) { if (!q(t)) return []; var i = []; for (var n in t) i.push(n); return $ && Rt(t, i), i } function Gt(t) { var i = Nt(t); return function(n) { if (null == n) return !1; var s = jt(n); if (Nt(s)) return !1; for (var e = 0; e < i; e++) if (!lt(n[t[e]])) return !1; return t !== $t || !lt(n[Wt]) } } var Wt = "forEach", Ht = ["clear", "delete"], Xt = ["get", "has", "set"], Vt = Ht.concat(Wt, Xt), $t = Ht.concat(Xt), Yt = ["add"].concat(Ht, Wt, "has"); const zt = vt ? Gt(Vt) : it("Map"), Kt = vt ? Gt($t) : it("WeakMap"), qt = vt ? Gt(Yt) : it("Set"), Zt = it("WeakSet"); function Jt(t) { for (var i = Pt(t), n = i.length, s = Array(n), e = 0; e < n; e++) s[e] = t[i[e]]; return s } function Qt(t) { for (var i = Pt(t), n = i.length, s = Array(n), e = 0; e < n; e++) s[e] = [i[e], t[i[e]]]; return s } function ti(t) { for (var i = {}, n = Pt(t), s = 0, e = n.length; s < e; s++) i[t[n[s]]] = n[s]; return i } function ii(t) { var i = []; for (var n in t) lt(t[n]) && i.push(n); return i.sort() } function ni(t, i) { return function(n) { var s = arguments.length; if (i && (n = Object(n)), s < 2 || null == n) return n; for (var e = 1; e < s; e++) for (var r = arguments[e], h = t(r), o = h.length, u = 0; u < o; u++) { var a = h[u]; i && void 0 !== n[a] || (n[a] = r[a]) } return n } } const si = ni(jt), ei = ni(Pt), ri = ni(jt, !0); function hi(t) { if (!q(t)) return {}; if (W) return W(t); var i = function() {}; i.prototype = t; var n = new i; return i.prototype = null, n } function oi(t, i) { var n = hi(t); return i && ei(n, i), n } function ui(t) { return q(t) ? pt(t) ? t.slice() : si({}, t) : t } function ai(t, i) { return i(t), t } function li(t) { return pt(t) ? t : [t] } function ci(t) { return Ct.toPath(t) } function fi(t, i) { for (var n = i.length, s = 0; s < n; s++) { if (null == t) return; t = t[i[s]] } return n ? t : void 0 } function vi(t, i, n) { var s = fi(t, ci(i)); return J(s) ? n : s } function di(t, i) { for (var n = (i = ci(i)).length, s = 0; s < n; s++) { var e = i[s]; if (!mt(t, e)) return !1; t = t[e] } return !!n } function _i(t) { return t } function pi(t) { return t = ei({}, t), function(i) { return Lt(i, t) } } function mi(t) { return t = ci(t), function(i) { return fi(i, t) } } function bi(t, i, n) { if (void 0 === i) return t; switch (null == n ? 3 : n) { case 1: return function(n) { return t.call(i, n) }; case 3: return function(n, s, e) { return t.call(i, n, s, e) }; case 4: return function(n, s, e, r) { return t.call(i, n, s, e, r) } } return function() { return t.apply(i, arguments) } } function wi(t, i, n) { return null == t ? _i : lt(t) ? bi(t, i, n) : q(t) && !pt(t) ? pi(t) : mi(t) } function gi(t, i) { return wi(t, i, 1 / 0) } function yi(t, i, n) { return Ct.iteratee !== gi ? Ct.iteratee(t, i) : wi(t, i, n) } function Ei(t, i, n) { i = yi(i, n); for (var s = Pt(t), e = s.length, r = {}, h = 0; h < e; h++) { var o = s[h]; r[o] = i(t[o], o, t) } return r } function Si() {} function Ai(t) { return null == t ? Si : function(i) { return vi(t, i) } } function Ti(t, i, n) { var s = Array(Math.max(0, t)); i = bi(i, n, 1); for (var e = 0; e < t; e++) s[e] = i(e); return s } function Mi(t, i) { return null == i && (i = t, t = 0), t + Math.floor(Math.random() * (i - t + 1)) } Ct.toPath = li, Ct.iteratee = gi; const Oi = Date.now || function() { return (new Date).getTime() }; function Ii(t) { var i = function(i) { return t[i] }, n = "(?:" + Pt(t).join("|") + ")", s = RegExp(n), e = RegExp(n, "g"); return function(t) { return s.test(t = null == t ? "" : "" + t) ? t.replace(e, i) : t } } const Ni = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "`": "`" }, Ri = Ii(Ni), Pi = Ii(ti(Ni)), xi = Ct.templateSettings = { evaluate: /<%([\s\S]+?)%>/g, interpolate: /<%=([\s\S]+?)%>/g, escape: /<%-([\s\S]+?)%>/g }; var Li = /(.)^/, Ci = { "'": "'", "\\": "\\", "\r": "r", "\n": "n", "\u2028": "u2028", "\u2029": "u2029" }, Ui = /\\|'|\r|\n|\u2028|\u2029/g; function ki(t) { return "\\" + Ci[t] } var Fi = /^\s*(\w|\$)+\s*$/; function Bi(t, i, n) { !i && n && (i = n), i = ri({}, i, Ct.templateSettings); var s = RegExp([(i.escape || Li).source, (i.interpolate || Li).source, (i.evaluate || Li).source].join("|") + "|$", "g"), e = 0, r = "__p+='"; t.replace(s, (function(i, n, s, h, o) { return r += t.slice(e, o).replace(Ui, ki), e = o + i.length, n ? r += "'+\n((__t=(" + n + "))==null?'':_.escape(__t))+\n'" : s ? r += "'+\n((__t=(" + s + "))==null?'':__t)+\n'" : h && (r += "';\n" + h + "\n__p+='"), i })), r += "';\n"; var h, o = i.variable; if (o) { if (!Fi.test(o)) throw new Error("variable is not a bare identifier: " + o) } else r = "with(obj||{}){\n" + r + "}\n", o = "obj"; r = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + r + "return __p;\n"; try { h = new Function(o, "_", r) } catch (t) { throw t.source = r, t } var u = function(t) { return h.call(this, t, Ct) }; return u.source = "function(" + o + "){\n" + r + "}", u } function Di(t, i, n) { var s = (i = ci(i)).length; if (!s) return lt(n) ? n.call(t) : n; for (var e = 0; e < s; e++) { var r = null == t ? void 0 : t[i[e]]; void 0 === r && (r = n, e = s), t = lt(r) ? r.call(t) : r } return t } var ji = 0; function Gi(t) { var i = ++ji + ""; return t ? t + i : i } function Wi(t) { var i = Ct(t); return i.qd = !0, i } function Hi(t, i, n, s, e) { if (!(s instanceof i)) return t.apply(n, e); var r = hi(t.prototype), h = t.apply(r, e); return q(h) ? h : r } var Xi = K((function(t, i) { var n = Xi.placeholder, s = function() { for (var e = 0, r = i.length, h = Array(r), o = 0; o < r; o++) h[o] = i[o] === n ? arguments[e++] : i[o]; for (; e < arguments.length;) h.push(arguments[e++]); return Hi(t, s, this, this, h) }; return s })); Xi.placeholder = Ct; const Vi = Xi, $i = K((function(t, i, n) { if (!lt(t)) throw new TypeError("Bind must be called on a function"); var s = K((function(e) { return Hi(t, s, i, this, n.concat(e)) })); return s })), Yi = St(Nt); function zi(t, i, n, s) { if (s = s || [], i || 0 === i) { if (i <= 0) return s.concat(t) } else i = 1 / 0; for (var e = s.length, r = 0, h = Nt(t); r < h; r++) { var o = t[r]; if (Yi(o) && (pt(o) || wt(o))) if (i > 1) zi(o, i - 1, n, s), e = s.length; else for (var u = 0, a = o.length; u < a;) s[e++] = o[u++]; else n || (s[e++] = o) } return s } const Ki = K((function(t, i) { var n = (i = zi(i, !1, !1)).length; if (n < 1) throw new Error("bindAll must be passed function names"); for (; n--;) { var s = i[n]; t[s] = $i(t[s], t) } return t })); function qi(t, i) { var n = function(s) { var e = n.cache, r = "" + (i ? i.apply(this, arguments) : s); return mt(e, r) || (e[r] = t.apply(this, arguments)), e[r] }; return n.cache = {}, n } const Zi = K((function(t, i, n) { return setTimeout((function() { return t.apply(null, n) }), i) })), Ji = Vi(Zi, Ct, 1); function Qi(t, i, n) { var s, e, r, h, o = 0; n || (n = {}); var u = function() { o = !1 === n.leading ? 0 : Oi(), s = null, h = t.apply(e, r), s || (e = r = null) }, a = function() { var a = Oi(); o || !1 !== n.leading || (o = a); var l = i - (a - o); return e = this, r = arguments, l <= 0 || l > i ? (s && (clearTimeout(s), s = null), o = a, h = t.apply(e, r), s || (e = r = null)) : s || !1 === n.trailing || (s = setTimeout(u, l)), h }; return a.cancel = function() { clearTimeout(s), o = 0, s = e = r = null }, a } function tn(t, i, n) { var s, e, r, h, o, u = function() { var a = Oi() - e; i > a ? s = setTimeout(u, i - a) : (s = null, n || (h = t.apply(o, r)), s || (r = o = null)) }, a = K((function(a) { return o = this, r = a, e = Oi(), s || (s = setTimeout(u, i), n && (h = t.apply(o, r))), h })); return a.cancel = function() { clearTimeout(s), s = r = o = null }, a } function nn(t, i) { return Vi(i, t) } function sn(t) { return function() { return !t.apply(this, arguments) } } function en() { var t = arguments, i = t.length - 1; return function() { for (var n = i, s = t[i].apply(this, arguments); n--;) s = t[n].call(this, s); return s } } function rn(t, i) { return function() { if (--t < 1) return i.apply(this, arguments) } } function hn(t, i) { var n; return function() { return --t > 0 && (n = i.apply(this, arguments)), t <= 1 && (i = null), n } } const on = Vi(hn, 2); function un(t, i, n) { i = yi(i, n); for (var s, e = Pt(t), r = 0, h = e.length; r < h; r++) if (i(t[s = e[r]], s, t)) return s } function an(t) { return function(i, n, s) { n = yi(n, s); for (var e = Nt(i), r = t > 0 ? 0 : e - 1; r >= 0 && r < e; r += t) if (n(i[r], r, i)) return r; return -1 } } const ln = an(1), cn = an(-1); function fn(t, i, n, s) { for (var e = (n = yi(n, s, 1))(i), r = 0, h = Nt(t); r < h;) { var o = Math.floor((r + h) / 2); n(t[o]) < e ? r = o + 1 : h = o } return r } function vn(t, i, n) { return function(s, e, r) { var h = 0, o = Nt(s); if ("number" == typeof r) t > 0 ? h = r >= 0 ? r : Math.max(r + o, h) : o = r >= 0 ? Math.min(r + 1, o) : r + o + 1; else if (n && r && o) return s[r = n(s, e)] === e ? r : -1; if (e != e) return (r = i(U.call(s, h, o), yt)) >= 0 ? r + h : -1; for (r = t > 0 ? h : o - 1; r >= 0 && r < o; r += t) if (s[r] === e) return r; return -1 } } const dn = vn(1, ln, fn), _n = vn(-1, cn); function pn(t, i, n) { var s = (Yi(t) ? ln : un)(t, i, n); if (void 0 !== s && -1 !== s) return t[s] } function mn(t, i) { return pn(t, pi(i)) } function bn(t, i, n) { var s, e; if (i = bi(i, n), Yi(t)) for (s = 0, e = t.length; s < e; s++) i(t[s], s, t); else { var r = Pt(t); for (s = 0, e = r.length; s < e; s++) i(t[r[s]], r[s], t) } return t } function wn(t, i, n) { i = yi(i, n); for (var s = !Yi(t) && Pt(t), e = (s || t).length, r = Array(e), h = 0; h < e; h++) { var o = s ? s[h] : h; r[h] = i(t[o], o, t) } return r } function gn(t) { return function(i, n, s, e) { var r = arguments.length >= 3; return function(i, n, s, e) { var r = !Yi(i) && Pt(i), h = (r || i).length, o = t > 0 ? 0 : h - 1; for (e || (s = i[r ? r[o] : o], o += t); o >= 0 && o < h; o += t) { var u = r ? r[o] : o; s = n(s, i[u], u, i) } return s }(i, bi(n, e, 4), s, r) } } const yn = gn(1), En = gn(-1); function Sn(t, i, n) { var s = []; return i = yi(i, n), bn(t, (function(t, n, e) { i(t, n, e) && s.push(t) })), s } function An(t, i, n) { return Sn(t, sn(yi(i)), n) } function Tn(t, i, n) { i = yi(i, n); for (var s = !Yi(t) && Pt(t), e = (s || t).length, r = 0; r < e; r++) { var h = s ? s[r] : r; if (!i(t[h], h, t)) return !1 } return !0 } function Mn(t, i, n) { i = yi(i, n); for (var s = !Yi(t) && Pt(t), e = (s || t).length, r = 0; r < e; r++) { var h = s ? s[r] : r; if (i(t[h], h, t)) return !0 } return !1 } function On(t, i, n, s) { return Yi(t) || (t = Jt(t)), ("number" != typeof n || s) && (n = 0), dn(t, i, n) >= 0 } const In = K((function(t, i, n) { var s, e; return lt(i) ? e = i : (i = ci(i), s = i.slice(0, -1), i = i[i.length - 1]), wn(t, (function(t) { var r = e; if (!r) { if (s && s.length && (t = fi(t, s)), null == t) return; r = t[i] } return null == r ? r : r.apply(t, n) })) })); function Nn(t, i) { return wn(t, mi(i)) } function Rn(t, i) { return Sn(t, pi(i)) } function Pn(t, i, n) { var s, e, r = -1 / 0, h = -1 / 0; if (null == i || "number" == typeof i && "object" != typeof t[0] && null != t) for (var o = 0, u = (t = Yi(t) ? t : Jt(t)).length; o < u; o++) null != (s = t[o]) && s > r && (r = s); else i = yi(i, n), bn(t, (function(t, n, s) { ((e = i(t, n, s)) > h || e === -1 / 0 && r === -1 / 0) && (r = t, h = e) })); return r } function xn(t, i, n) { var s, e, r = 1 / 0, h = 1 / 0; if (null == i || "number" == typeof i && "object" != typeof t[0] && null != t) for (var o = 0, u = (t = Yi(t) ? t : Jt(t)).length; o < u; o++) null != (s = t[o]) && s < r && (r = s); else i = yi(i, n), bn(t, (function(t, n, s) { ((e = i(t, n, s)) < h || e === 1 / 0 && r === 1 / 0) && (r = t, h = e) })); return r } function Ln(t, i, n) { if (null == i || n) return Yi(t) || (t = Jt(t)), t[Mi(t.length - 1)]; var s = Yi(t) ? ui(t) : Jt(t), e = Nt(s); i = Math.max(Math.min(i, e), 0); for (var r = e - 1, h = 0; h < i; h++) { var o = Mi(h, r), u = s[h]; s[h] = s[o], s[o] = u } return s.slice(0, i) } function Cn(t) { return Ln(t, 1 / 0) } function Un(t, i, n) { var s = 0; return i = yi(i, n), Nn(wn(t, (function(t, n, e) { return { value: t, index: s++, criteria: i(t, n, e) } })).sort((function(t, i) { var n = t.criteria, s = i.criteria; if (n !== s) { if (n > s || void 0 === n) return 1; if (n < s || void 0 === s) return -1 } return t.index - i.index })), "value") } function kn(t, i) { return function(n, s, e) { var r = i ? [ [], [] ] : {}; return s = yi(s, e), bn(n, (function(i, e) { var h = s(i, e, n); t(r, i, h) })), r } } const Fn = kn((function(t, i, n) { mt(t, n) ? t[n].push(i) : t[n] = [i] })), Bn = kn((function(t, i, n) { t[n] = i })), Dn = kn((function(t, i, n) { mt(t, n) ? t[n]++ : t[n] = 1 })), jn = kn((function(t, i, n) { t[n ? 0 : 1].push(i) }), !0); var Gn = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; function Wn(t) { return t ? pt(t) ? U.call(t) : nt(t) ? t.match(Gn) : Yi(t) ? wn(t, _i) : Jt(t) : [] } function Hn(t) { return null == t ? 0 : Yi(t) ? t.length : Pt(t).length } function Xn(t, i, n) { return i in n } const Vn = K((function(t, i) { var n = {}, s = i[0]; if (null == t) return n; lt(s) ? (i.length > 1 && (s = bi(s, i[1])), i = jt(t)) : (s = Xn, i = zi(i, !1, !1), t = Object(t)); for (var e = 0, r = i.length; e < r; e++) { var h = i[e], o = t[h]; s(o, h, t) && (n[h] = o) } return n })), $n = K((function(t, i) { var n, s = i[0]; return lt(s) ? (s = sn(s), i.length > 1 && (n = i[1])) : (i = wn(zi(i, !1, !1), String), s = function(t, n) { return !On(i, n) }), Vn(t, s, n) })); function Yn(t, i, n) { return U.call(t, 0, Math.max(0, t.length - (null == i || n ? 1 : i))) } function zn(t, i, n) { return null == t || t.length < 1 ? null == i || n ? void 0 : [] : null == i || n ? t[0] : Yn(t, t.length - i) } function Kn(t, i, n) { return U.call(t, null == i || n ? 1 : i) } function qn(t, i, n) { return null == t || t.length < 1 ? null == i || n ? void 0 : [] : null == i || n ? t[t.length - 1] : Kn(t, Math.max(0, t.length - i)) } function Zn(t) { return Sn(t, Boolean) } function Jn(t, i) { return zi(t, i, !1) } const Qn = K((function(t, i) { return i = zi(i, !0, !0), Sn(t, (function(t) { return !On(i, t) })) })), ts = K((function(t, i) { return Qn(t, i) })); function is(t, i, n, s) { Q(i) || (s = n, n = i, i = !1), null != n && (n = yi(n, s)); for (var e = [], r = [], h = 0, o = Nt(t); h < o; h++) { var u = t[h], a = n ? n(u, h, t) : u; i && !n ? (h && r === a || e.push(u), r = a) : n ? On(r, a) || (r.push(a), e.push(u)) : On(e, u) || e.push(u) } return e } const ns = K((function(t) { return is(zi(t, !0, !0)) })); function ss(t) { for (var i = [], n = arguments.length, s = 0, e = Nt(t); s < e; s++) { var r = t[s]; if (!On(i, r)) { var h; for (h = 1; h < n && On(arguments[h], r); h++); h === n && i.push(r) } } return i } function es(t) { for (var i = t && Pn(t, Nt).length || 0, n = Array(i), s = 0; s < i; s++) n[s] = Nn(t, s); return n } const rs = K(es); function hs(t, i) { for (var n = {}, s = 0, e = Nt(t); s < e; s++) i ? n[t[s]] = i[s] : n[t[s][0]] = t[s][1]; return n } function os(t, i, n) { null == i && (i = t || 0, t = 0), n || (n = i < t ? -1 : 1); for (var s = Math.max(Math.ceil((i - t) / n), 0), e = Array(s), r = 0; r < s; r++, t += n) e[r] = t; return e } function us(t, i) { if (null == i || i < 1) return []; for (var n = [], s = 0, e = t.length; s < e;) n.push(U.call(t, s, s += i)); return n } function as(t, i) { return t.qd ? Ct(i).chain() : i } function ls(t) { return bn(ii(t), (function(i) { var n = Ct[i] = t[i]; Ct.prototype[i] = function() { var t = [this.Kd]; return C.apply(t, arguments), as(this, n.apply(Ct, t)) } })), Ct } bn(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], (function(t) { var i = P[t]; Ct.prototype[t] = function() { var n = this.Kd; return null != n && (i.apply(n, arguments), "shift" !== t && "splice" !== t || 0 !== n.length || delete n[0]), as(this, n) } })), bn(["concat", "join", "slice"], (function(t) { var i = P[t]; Ct.prototype[t] = function() { var t = this.Kd; return null != t && (t = i.apply(t, arguments)), as(this, t) } })); const cs = Ct; var fs = ls(t); fs.Zd = fs; const vs = "Mahjong Phoenix_files", ds = vs + "/shared/paytable-rules/img"; let _s = 0, ps = {}; function ms(t) { const i = new URL(window.location.href).searchParams.get("brand"), n = i ? i.toLocaleLowerCase() : null; return n && (null == t ? void 0 : t.includes(n)) ? n : null } function bs() { const t = document.querySelectorAll(".symbol-container"); if (_s = I.kc.getInst().totalBet / I.kc.getInst().credit, t && t.length > 0) for (const s of t) { const t = s.querySelector(".symbol-desc"), e = t ? t.outerHTML : ""; s.innerHTML = ""; const r = s.getAttribute("data-symbol-name"), h = ps.symbols.find((t => t.name === r)); let o = 1, u = "", a = r; if (!xt(h)) { n.AppConfig.gameConfig.SLOT_TYPE === n.SlotType.LINE_GAME && (o = n.AppConfig.gameConfig.SLOT_NUMBER_OF_LINES); const t = Object.keys(h.values).sort(((t, i) => i - t)); for (const s of t) { let t, e = n.ConfigManager.getInst().hideGameCurrency ? "" : I.kc.getInst().currencySign; t = i.cQ.convertToMoneyFormat("totalBet" === h.multiplyBy ? h.values[s] * I.kc.getInst().totalBet : h.values[s] / o * _s); u += `
  • ${s} ${e+t}
  • ` } const s = h.supportedBrands, e = ms(s); s && e && (a = r + "_" + e) } s.innerHTML = `
    \n \n
    \n
    \n \n
    ` + e }! function() { const t = document.querySelector(".ways-example"); if (t) { let i = 1; n.AppConfig.gameConfig.SLOT_TYPE === n.SlotType.LINE_GAME && (i = n.AppConfig.gameConfig.SLOT_NUMBER_OF_LINES); const s = t.getAttribute("data-symbol-name"), e = t.getAttribute("data-symbol-value"), r = ps.symbols.find((t => t.name === s)).values[e] / i * (100 * _s) / 100; t.innerHTML = `${r} x 2 = ${2*r}` } }() } function ws() { return t = this, i = null, s = function*() { const t = document.getElementById("game-overlay"); O.j(`${vs}/style.css`), O.j(`${vs}/shared/paytable-rules/css/style.css`); let i = yield O.bE(`${vs}/shared/paytable-rules/html/paytable.html`); i = i.replace(/@language@/g, n.Localization.getCurrentLanguage()), t.insertAdjacentHTML("beforeend", i.replace(/@assetsPath@/g, vs)), i = yield O.bE(`${vs}/shared/paytable-rules/html/rules.html`), t.insertAdjacentHTML("beforeend", i.replace(/@assetsPath@/g, vs)); const s = yield O.bE(`${vs}/shared/paytable-rules/config.json`); if (ps = JSON.parse(s), null !== document.getElementById("rules")) { const t = new URLSearchParams(window.location.search), i = t.get("exitButton"), n = t.get("return"); "enable" === i || null !== n ? document.getElementById("rules-menu-bar").setAttribute("src", `./${vs}/Menu/menu_bar1.webp`) : document.getElementById("rules-game-exit").style.display = "none" } const e = yield O.vf(`${vs}/shared/paytable-rules/locale/`, n.Localization.getCurrentLanguage()); O.O9(t, e), document.querySelectorAll(".branding-assets").forEach((t => { const i = t.getAttribute("data-brand"), n = ms(i); if (i && n) { const i = t.getAttribute("src").replace(".webp", `_${n}.webp`); t.src = i } })) }, new Promise(((n, e) => { var r = t => { try { o(s.next(t)) } catch (t) { e(t) } }, h = t => { try { o(s.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? n(t.value) : Promise.resolve(t.value).then(r, h); o((s = s.apply(t, i)).next()) })); var t, i, s } var gs = __webpack_require__(8661), ys = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); const Es = "Mahjong Phoenix_files", Ss = document.getElementById("game-container"), As = document.getElementById("game-overlay"); const Ts = new class { constructor() { this.isEnable = !0 } init(t) { return ys(this, null, (function*() { this.game = t; const i = yield this.Jd({ merchant: this.game.merchant, language: this.game.language, game: this.game.code }); if (this.isShow = i.isShow, this.isShow && i.info.length > 0) { this.tournamentInfo = i.info[0], O.j(`${Es}/shared/tournament/css/style.css`); const t = yield O.vf(`${Es}/shared/tournament/locale/`, this.game.language), n = yield O.bE(`${Es}/shared/tournament/html/tournament.html`); As.insertAdjacentHTML("beforeend", n.replace(/@assetsPath@/g, Es)), this.Qd(); const s = document.getElementById("tournament"), e = document.getElementById("tournament-bg"), r = document.getElementById("tournament-page"), h = document.getElementById("tournament-desc"); s.style.width = Ss.style.width; const o = parseInt(Ss.style.width) / e.offsetWidth * .25; document.getElementById("tournament-base").style.transform = `scale(${o})`, O.O9(s, t), this.t_(), this.updateTournamentOffsetPos(); let u = !1; const a = e.querySelectorAll("img.close"), l = e.querySelectorAll("img.open"), c = e.querySelectorAll("img.hover"), f = e.querySelector("img.small"); this.i_(a), e.addEventListener("click", (() => { if (this.isEnable) { this.isEnable = !1, u = !0, h.classList.add("bounce"); const t = this.n_; a[t].style.opacity = 0, c[t] && (c[t].style.opacity = 0), this.i_(l), s.classList.add("open"), s.style.height = Ss.style.height, setTimeout((() => { r.style.display = "block", r.style.width = Ss.style.width, r.style.height = Ss.style.height, r.querySelector("iframe").src = this.s_(), this.isEnable = !0, clearTimeout(this.minimizeInterval) }), 800); const i = r.querySelector(".tnm-close-button"); this.game.hasCloseBtn ? i.addEventListener("click", (() => { r.style.display = "none", h.classList.remove("bounce"), u = !1; const t = this.n_; s.classList.contains("open") && (l[t].style.opacity = 0, this.i_(a), s.classList.remove("open"), s.style.height = 0, this.e_()) })) : i.style.display = "none", this.game.alignCloseBtn && i.classList.add(this.game.alignCloseBtn) } })), e.addEventListener("mouseover", (t => { if (!u) { t.stopPropagation(); a[this.n_].style.opacity = 0, O.s2() || this.i_(c), s.classList.add("open"), clearTimeout(this.minimizeInterval), 1 == f.style.opacity && (f.style.opacity = 0, h.style.opacity = 1) } })), e.addEventListener("mouseout", (t => { if (!u) { t.stopPropagation(); const i = this.n_; O.s2() || this.fade(c[i], 0, 250), this.i_(a), s.classList.add("open"), this.e_() } })), this.e_(), window.addEventListener("resize", (function() { s.style.width = Ss.style.width, r.style.width = Ss.style.width, r.style.height = Ss.style.height; const t = parseInt(Ss.style.width) / e.offsetWidth * .25; document.getElementById("tournament-base").style.transform = `scale(${t})` })) } })) } show() { const t = document.getElementById("tournament"); this.isShow && t && t.classList.remove("d-none") } hide() { const t = document.getElementById("tournament"); this.isShow && t && (t.classList.add("d-none"), t.classList.remove("open")) } destroy() { document.getElementById("tournament").remove() } Qd() { let t = ""; const i = document.querySelector("#tournament-bg img"), n = (n, s, e) => { for (let r = 0; r <= s; r++) { const s = `${Es}/shared/tournament/img/new_button/button_${n}_${r.toString().padStart(2,"0")}.webp`, h = i.cloneNode(); h.setAttribute("src", s), h.classList.add(e), t += h.outerHTML } }; n("idle", 59, "close"), n("press", 29, "open"), n("hover", 0, "hover"), n("small", 0, "small"), document.getElementById("tournament-bg").innerHTML = t } i_(t) { this.n_ = 0, clearInterval(this.r_), t[this.n_].style.opacity = 1, this.r_ = setInterval((() => { t[this.n_].style.opacity = 0, this.n_ = (this.n_ + 1) % t.length, t[this.n_].style.opacity = 1 }), 33) } updateTournamentOffsetPos() { if (i.cQ.gameUtils.getTournamentOffsetPos && i.cQ.gameUtils.getTournamentOffsetPos()) { const t = i.cQ.gameUtils.getTournamentOffsetPos(), n = document.getElementById("tournament-bg"), s = document.getElementById("tournament-desc"); n.style.transform = `translate(${t.ICON_X}%, ${t.ICON_Y}%)`, s.style.transform = `translate(${t.DESC_X}%, 40%)`, s.style.top = `${t.DESC_TOP}px`; const e = Array.from(document.styleSheets).find((t => t.href && t.href.includes("/tournament/css/style.css"))); for (let t = 0; t < e.cssRules.length; t++) { const i = e.cssRules[t]; if (i.type === CSSRule.KEYFRAMES_RULE && "bounce" === i.name) { e.deleteRule(t); break } } e.insertRule(`\n @keyframes bounce {\n 0%, 40% {\n transform: translate(${t.DESC_X}%, 40%);\n }\n 20% {\n transform: translate(${t.DESC_X}%, 20%);\n }\n }\n `, e.cssRules.length) } } e_() { const t = document.getElementById("tournament-bg"), i = t.querySelectorAll("img.close"), n = t.querySelector("img.small"), s = document.getElementById("tournament-desc"), e = 1e3 * this.game.minimizeIconDuration; i.forEach((t => { t.style.transform = "scale(1)" })), n.style.transform = "scale(0.5)", this.minimizeInterval = setTimeout((() => { i.forEach((t => { const i = window.getComputedStyle(t); 1 == i.opacity && "none" !== i.display && (clearInterval(this.r_), this.fade(t, 0, 375, .5), setTimeout((() => { this.fade(n, 1, 375, .5) }), 200), s.style.opacity = 0) })) }), e) } t_() { const t = new Date(this.tournamentInfo.startDate), i = new Date(this.tournamentInfo.endDate), n = new Date; let s, e = 0, r = "days"; if (n < t ? e = Math.abs(t - n) : n < i ? e = Math.abs(i - n) : (document.getElementById("tournament-time").classList.add("d-none"), document.getElementById("tournament-end").classList.remove("d-none")), e > 0) { e > 2592e5 ? s = document.getElementById("time-72") : e > 432e5 ? (s = document.getElementById("time-12"), r = "hours") : (s = document.getElementById("time-0"), r = "minutes"), s.classList.remove("d-none"); const t = O.r1(e, r); for (const i in t) if (t.hasOwnProperty(i)) { const n = s.querySelector("." + i); n && (n.innerHTML = t[i]) } } setTimeout(this.t_.bind(this), 1e3) } Jd(t) { return ys(this, null, (function*() { try { const i = yield fetch(`${this.game.url}${this.game.api}`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(t) }); return yield i.json() } catch (t) { return { isShow: !1 } } })) } s_() { return `${this.game.url}${this.game.webpage}?merchant=${this.game.merchant}&playerId=${this.game.playerId}&game=${this.game.code}&lang=${this.game.language}¤cy=${this.game.currency}&tid=${this.tournamentInfo.id}` } fade(t, i, n, s) { let e = "", r = "", h = ""; requestAnimationFrame((() => { void 0 !== i && (e = "opacity", r = `opacity ${n}ms ease-in-out`), void 0 !== s && (e += ", ", e += "transform", r += ", ", r += `transform ${n}ms ease-in-out`, h = `scale(${s})`), t.style.willChange = e, t.style.transition = r, t.style.opacity = i, t.style.transform = h, setTimeout((() => { t.style.transition = "" }), n) })) } }; var Ms = __webpack_require__(3567); const Os = class extends Ms.B1 { constructor() { super("CENTER"), this.h_ = null, this.o_ = [], this.u_ = [], this.a_ = null, this.container.offsetY = n.AppConfig.BASE_SCREEN_HEIGHT / 2 - (Os.TITLE_HEIGHT + Os.CONTENT_HEIGHT) } init() { super.initBase(), this.jf = new v.TC, this.jf.beginFill(0, .4), this.jf.drawRect(-n.AppConfig.BASE_SCREEN_WIDTH / 2, 1.5 * -n.AppConfig.MAX_CANVAS_HEIGHT, n.AppConfig.BASE_SCREEN_WIDTH, 2 * n.AppConfig.MAX_CANVAS_HEIGHT - this.mv), this.container.addChild(this.jf), this.jf.interactive = !0; const t = new v.TC; t.beginFill(Os.BACKGROUND_COLOR, 1), t.drawRect(-n.AppConfig.BASE_SCREEN_WIDTH / 2, 250, n.AppConfig.BASE_SCREEN_WIDTH, 3 * M.Menu.SPIN_PANEL_HEIGHT), t.endFill(), t.name = "optionBG", this.container.addChild(t); const e = new m.xv(n.Localization.getText("TXT_NUMBER_AUTOSPIN"), { fontFamily: Os.CUSTOM_TEXT_FONT, fontSize: 25, fill: [Os.TEXT_TITLE_COLOR] }); e.anchor.set(.5), e.position.y = 300, this.container.addChild(e); const h = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("menu_popup_atlas", "close_button")) }).on("click", (() => { s.getInst().playSfx("SFX_BUTTON_CLICK"), this.close() })); h.getContainer().anchor.set(.5), h.getContainer().position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2 - h.getContainer().width, 410), h.getContainer().hitArea = new r.Ae(-40, -40, 80, 80), this.container.addChild(h.getContainer()); const o = n.Localization.getText("BET_AMOUNT_LIST").split(","); for (let t = 0; t < Os.AUTO_SPIN_VALUES.length; t++) { const e = o[t], r = "∞" === e ? 67.5 : 45, h = "∞" === e ? -5 : 0, u = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("menu_popup_atlas", "turboAndAutoplayLayer_portrait")), text: new m.xv(e, { fontFamily: "sfprodisplaymedium", fontSize: r, fill: [Os.TEXT_COLOR], align: "center" }), colorTextHighlight: Os.TEXT_HIGHLIGHT_COLOR }).on("click", (() => { s.getInst().playSfx("SFX_BUTTON_CLICK"), I.kc.getInst().balance < I.kc.getInst().totalBet ? Gs.getConfirmPopup().open(n.Localization.getText("RES_11101"), n.Localization.getText("CONFIRM"), null) : (this.close(), i.zW.emit(i.qM.ACTIVE_AUTO_SPIN, Os.AUTO_SPIN_VALUES[t])) })); u.getText().y += h, u.getContainer().anchor.set(.5), u.getContainer().x = 110 * t - 355 + u.getContainer().width / 2, u.getContainer().y = 410, this.container.addChild(u.getContainer()) } } open(t, i) { super.open(), t && (this.h_ = t), this.l_(i) } l_(t) { this.u_.forEach((t => { t.setToggle(!1) })) } c_(t) { this.o_.forEach((i => { i.setToggle(i === t) })) } f_(t) { this.u_.forEach((i => { i.setToggle(i === t) })), this.a_.setInteractable(!0) } v_() { let t = -1; return this.u_.forEach(((i, n) => { i.isToggled() && (t = Os.AUTO_SPIN_VALUES[n]) })), t } }; let Is = Os; Is.BACKGROUND_COLOR = 1710877, Is.BACKGROUND_HIGHLIGHT_COLOR = 2631731, Is.TEXT_COLOR = 8158332, Is.TEXT_HIGHLIGHT_COLOR = 16725798, Is.TEXT_TITLE_COLOR = 16777215, Is.CUSTOM_TEXT_FONT = "robotoregular", Is.TITLE_HEIGHT = 0, Is.CONTENT_HEIGHT = 3 * M.Menu.SPIN_PANEL_HEIGHT - 75, Is.AUTO_SPIN_VALUES = [5, 10, 25, 50, 100, 9999]; class Ns extends Ms.pw { constructor() { super(), this.nv = null, this.dv = !1, this.pv = null } init(t, s) { this.jf = new v.TC, this.jf.beginFill(t.color, t.alpha), this.jf.drawRect(-n.AppConfig.BASE_SCREEN_WIDTH / 2, -n.AppConfig.BASE_SCREEN_HEIGHT / 2, n.AppConfig.BASE_SCREEN_WIDTH, n.AppConfig.MAX_CANVAS_HEIGHT), this.jf.position.y = -n.AppConfig.MAX_CANVAS_MARGIN_Y, this.container.addChild(this.jf), this.nv = new m.xv(s.text, s.style), s.position && this.nv.position.copyFrom(s.position), this.nv.anchor.set(.5), this.container.addChild(this.nv), this.initBase(), this.jf.addListener("pointerup", this.d_.bind(this)), this.pv = new i.N1, this.pv.addKey("Space", this.__.bind(this)), this.jf.interactive = !0 } open(t, n, s) { if (void 0 !== t && (this.nv.text = t), this.Yf(), n && n > -1) { let t = ""; const e = i.b2.setTimeout(n, (() => { i.b2.clearInterval(t), this.close(), s && s() })); t = i.b2.setInterval(50, (() => { this.dv && (this.dv = !1, i.b2.clearTimeout(e), i.b2.clearInterval(t), this.close(), s && s()) })) } } d_(t) { this.dv = !0 } __(t) { if ("Space" === t.code) this.dv = !0 } } var Rs = Object.getPrototypeOf, Ps = Reflect.get, xs = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })), Ls = (t => (t[t.BIGWIN = 0] = "BIGWIN", t[t.TOTALWIN = 1] = "TOTALWIN", t))(Ls || {}); class Cs extends Ms.ej { constructor() { super(), this.p_ = 500, this.m_ = 0, this.b_ = null, this.w_ = 0, this.g_ = null, this.y_ = null, this.E_ = !1, this.S_ = "s", this.A_ = 0, this.T_ = 0 } init(t, n, s, e) { this.m_ = e, t.alpha = .5, super.init(t), this.jf.scale.set(1.1, 1); const r = new u.W2; this.container.addChild(r), this.Lu(n, (t => { this.y_ = new E.PY(t), r.addChild(this.y_), this.y_.visible = !1 })); const h = new u.W2; this.container.addChild(h), this.Lu(s, (t => { this.g_ = new E.PY(t), h.addChild(this.g_), this.g_.visible = !1, this.g_.position.set(0, -50), this.O_ = new p.Xz(i.JK.currencyFormatAmount(0), { fontName: M.Font.FONT_BIGWIN, fontSize: 40, align: "center" }), this.O_.anchor.set(.5), 0 === this.m_ ? (this.b_ = new Ms.WP(this.O_), this.w_ = M.Popup.LAST_WAITING_TIME_BIGWIN_POPUP) : 1 === this.m_ && (this.b_ = new Ms.Mc(this.O_), this.w_ = M.Popup.LAST_WAITING_TIME_TOTALWIN_POPUP), this.b_.position.set(0, 100), this.b_.alignCenter(), this.b_.visible = !1, h.addChild(this.b_) })) } I_() { i.kX.to(250, this.b_.scale, { x: 1.2, y: 1.2 }, 0, (() => { i.kX.to(100, this.b_.scale, { x: 1, y: 1 }) })) } open(t, n, e) { return xs(this, null, (function*() { yield this.ku(), s.getInst().playSfx("BGM_WINS_SERIES"), this.E_ = !1, this.A_ = t; let r = 0; if (t) if (0 === this.m_) { const n = I.kc.getInst().totalBet, h = []; let o = 0; for (const i of M.Popup.BIGWIN_MILESTONES) { let s = i[1]; const u = n * i[0]; if (t < u) break; e < u ? (u - e <= n && (s = M.Popup.MIN_TIME_OF_LAST_BIGWIN_MILESTONE), h.push([u, s]), o = t - u, r += s) : o = t - e } if (o > 0) { const i = Math.min(M.Popup.MAX_TIME_OF_LAST_BIGWIN_MILESTONE, Math.max(M.Popup.MIN_TIME_OF_LAST_BIGWIN_MILESTONE, o / (n * M.Popup.BIGWIN_MILESTONES[0][0]) * M.Popup.BIGWIN_MILESTONES[0][1])); h.push([t, i]), r += i } for (let t = 0; t < h.length; t++) h[t][1] = h[t][1] / r * M.Popup.TIME_BIGWIN_COUNT_MONEY; this.y_.visible = !0, this.g_.visible = !0, this.T_ = 0, this.b_ instanceof Ms.WP && (i.b2.setTimeout(M.Popup.RUN_BIGWIN_NUMBER_DELAY_TIME, (() => { this.b_.visible = !0, this.I_(), this.E_ = !0 })), s.getInst().playSfx("SFX_WINNING_INCREMENT", 1, !0), this.b_.tweenMilestoneValues(e, M.Control.MONEY_BIGWIN_COUNTING_DELAY_FRAME, h, this.wf.bind(this), this.gf.bind(this), this.yf.bind(this), this.isTapped.bind(this), this.resetTap.bind(this), M.Popup.RUN_BIGWIN_NUMBER_DELAY_TIME).then((() => { s.getInst().stop("SFX_WINNING_INCREMENT"), s.getInst().playSfx("BGM_WINS_SERIES_END"), s.getInst().fade("BGM_WINS_SERIES", "AUTO", 0, 500, !1), this.setNewCloseTime(this.w_) }))) } else 1 === this.m_ && (r = M.Popup.TOTALWIN_POPUP_ANIM_PLAY_TIME, this.g_.visible = !0, this.g_.state.setAnimation(0, `in_thang_lon_${this.S_}`, !1), this.g_.state.addAnimation(0, `thang_lon_loop_${this.S_}`, !0, 0), this.b_.setStartDelay(M.Popup.RUN_TOTALWIN_NUMBER_DELAY_TIME), i.b2.setTimeout(M.Popup.RUN_TOTALWIN_NUMBER_DELAY_TIME, (() => { this.E_ = !0, this.b_.visible = !0 })), this.b_.tweenValue(1, t, r, 2, this.isTapped.bind(this)).then((() => { this.setNewCloseTime(this.w_), this.resetTap() }))); return (h = Cs.prototype, o = this, u = "open", Ps(Rs(h), u, o)).call(this, M.Popup.TIME_BIGWIN_COUNT_MONEY + this.w_, (() => { n && n() })); var h, o, u })) } showLoadResourcePopup() { return xs(this, null, (function*() { return new Promise((t => { Ms.Cg.popupMgr.loadingResourcePopup.open(n.Localization.getText("TXT_DOWN"), -1, (() => { t() }), this) })) })) } setAnimPlay(t) { this.S_ = t } wf(t) { let i = -1; const n = t / I.kc.getInst().totalBet; for (const t of M.Popup.BIGWIN_MILESTONES) n >= t[0] && i++; return i > -1 ? i : 0 } gf(t, n) { const e = this.wf(t), r = this.wf(n); if (r > 0 && r > e && i.b2.setTimeout(600, (() => { this.I_() })), 0 === n || r > e) { const t = Math.max(e, r); this.g_ && (this.N_(this.g_, M.Popup.BIGWIN_AINM_IDS[t][0], !1, 0), this.R_(this.g_, M.Popup.BIGWIN_AINM_IDS[t][1])), this.y_ && (this.y_.state.setAnimation(0, "idle", !0), this.N_(this.y_, M.Popup.BIGWIN_COLOR_AINM_IDS[t], !0, .25, 1)); const i = M.Popup.BIGWIN_SOUND_IDS[t]; i && s.getInst().playSfx(i) } } yf() { i.cQ.fitFontSizeByCharacter(this.O_, this.O_.text, [{ digits: 11, fontSize: 20, pos: this.O_.position }, { digits: 9, fontSize: 25, pos: this.O_.position }, { digits: -1, fontSize: 30, pos: this.O_.position }]) } N_(t, i, n = !1, s = 0, e = 0) { t.state.getCurrent(e) && t.stateData.setMix(t.state.getCurrent(e).animation.name, i, s); return 1e3 * t.state.setAnimation(e, i, n).animation.duration } R_(t, i, n = 0) { t.state.addAnimation(n, i, !0, 0) } onPause() { this.g_ && (this.g_.visible = !1), this.y_ && (this.y_.visible = !1) } onResume() { this.g_ && (this.g_.visible = !0), this.y_ && (this.y_.visible = !0) } close() { const t = this.wf(this.A_), n = this.N_(this.g_, M.Popup.BIGWIN_AINM_IDS[t][2], !1, .25); this.N_(this.y_, "off", !1, .25, 0), i.b2.setTimeout(n, (() => { this.N_(this.y_, "off", !0, .25, 1) })); const e = this.p_; i.kX.to(e, this.g_, { alpha: .1 }, 1e3, (() => { this.g_.visible = !1, this.g_.alpha = 1, i.cQ.cleanSpine(this.g_) })), i.kX.to(e, this.y_, { alpha: .1 }, 200, (() => { this.y_.visible = !1, this.y_.alpha = 1, i.cQ.cleanSpine(this.y_) })), i.kX.to(e, this.b_, { alpha: .1 }, 200, (() => { this.b_.visible = !1, this.b_.alpha = 1 })), s.getInst().isPlaying("BGM_WINS_SERIES") && s.getInst().fade("BGM_WINS_SERIES", "AUTO", 0, 500, !1), s.getInst().stop("SFX_WINS_SERIES_PAYOUT_LOOP"), this.setFadeoutTime(e + 2e3), super.close() } onPointerUp(t) { this.E_ && super.onPointerUp(t) } resetTap() { this.E_ && super.resetTap() } onKeyDown(t) { this.E_ && super.onKeyDown(t) } } var Us = __webpack_require__(9181); class ks {} ks.useSmokeSpinTest = !1, ks.useSmokeJoinGame = !1, ks.MockSpinDatas = [], ks.MockSettingGameData = [], ks.MockLoginData = [], ks.MockFreeGameData = []; const Fs = class { constructor() { this.betValue = 1, this.P_ = null, this.L_ = Fs.NetworkState.Init, this.C_ = Fs.GameState.NormalSpin, this.U_ = !1, this.k_ = 0, this.F_ = 0, this.B_ = 0, this.D_ = 0, this.j_(), this.L_ = Fs.NetworkState.Init, this.P_ = new Us.EventEmitter } static getInst() { return Fs.Wu || (Fs.Wu = new Fs), Fs.Wu } update(t) {} getNetworkState() { return this.L_ } registerEvent(t, i) { this.P_.on(t, i) } requestSpin() { if (ks.useSmokeSpinTest) return void setTimeout((() => { const t = ks.MockSpinDatas[this.D_]; this.P_.emit(Fs.CLIENT_STATE_UPDATED_EVENT, t), I.kc.getInst().mockSpin(t), this.D_ = this.D_ >= ks.MockSpinDatas.length - 1 ? 0 : this.D_ + 1 }), i.cQ.randomRange(100, 200)); const t = I.kc.getInst().spinInfo, s = I.kc.getInst().gameInfo; let e = 0; t ? (t.respinGame || t.freeGame || t.fgRemainGame) && (e = 1) : (s.respinGame || s.freeGame && (s.freeGame.respinGame || s.freeGame.spins)) && (e = 1), I.kc.getInst().spinGameRequest(!1, e).then((t => { t.code > 0 ? Gs.getConfirmPopup().open(n.Localization.getText("RES_" + t.code), n.Localization.getText("RELOAD"), (() => { location.reload() }), 1) : (I.kc.getInst().spinInfo = t, this.P_.emit(Fs.CLIENT_STATE_UPDATED_EVENT, t)) })) } buyFeature() { I.kc.getInst().socketRequest().buyFeatureGame(null).then((t => { t.code > 0 ? (Gs.getConfirmPopup().open(n.Localization.getText("RES_" + t.code), n.Localization.getText("CONFIRM"), (() => { location.reload() })), Gs.getInst().buyFeaturePopup.resetCanBuy()) : t.featureResults ? (this.P_.emit(Fs.CLIENT_STATE_BUY_FREEGAME_EVENT, t), I.kc.getInst().spinInfo = t, Re.getInst().updateLostBalanceBuyGame(t.successBet)) : (Gs.getConfirmPopup().open(n.Localization.getText("RES_1"), n.Localization.getText("CONFIRM")), Gs.getInst().buyFeaturePopup.resetCanBuy()) })) } betGamble(t) { const i = { gameCode: n.ConfigManager.getInst().gameCode, line: I.kc.getInst().line, unit: I.kc.getInst().unit, totalBet: I.kc.getInst().totalBet, domination: I.kc.getInst().selectedDenomination, credit: I.kc.getInst().credit, freespin: 0, buyFeature: 1, sessionId: I.kc.getInst().loginInfo.sessionId, token: I.fL.getInst().token, gbType: t }; I.fL.getInst().sendRequest(420, i).then((t => { var i, s; t.code > 0 ? Gs.getConfirmPopup().open(n.Localization.getText("RES_11101"), n.Localization.getText("CONFIRM"), (() => { location.reload() }), 1) : (this.P_.emit(Fs.CLIENT_STATE_BUY_BONUS_SKILL_EVENT, [null == (i = t.gambleInfo) ? void 0 : i.gbType, null == (s = t.gambleInfo) ? void 0 : s.totalWin, t.successBet]), I.kc.getInst().spinInfo = t) })) } j_() {} buildCommandStrategy(t) { return { resendCount: 3, shouldWaitForACK: !0, canBeDuplicated: !1 } } gotoPanicMode() { this.L_ = Fs.NetworkState.Panic } gotoDieMode() { this.L_ = Fs.NetworkState.Die, this.U_ || (Gs.getInst(), Gs.getConfirmPopup().open(n.Localization.getText("MSG_SOCKET_ERROR"), n.Localization.getText("TXT_DOWN"), (() => { location.reload() }))) } gotoNormalMode() { this.j_() } }; let Bs = Fs; Bs.Wu = null, Bs.CLIENT_STATE_UPDATED_EVENT = "state-updated", Bs.CLIENT_STATE_BUY_FEATURE_EVENT = "state-buy-feature", Bs.CLIENT_STATE_BUY_FREEGAME_EVENT = "state-buy-freegame", Bs.CLIENT_STATE_BUY_BONUS_SKILL_EVENT = "state-buy-bunus-skill", Bs.SPIN_REQUEST_TIMEOUT = 5e3, (t => { let i; var n; let s; var e; (n = i = t.NetworkState || (t.NetworkState = {})).Init = "INIT", n.Normal = "NORMAL", n.Panic = "PANIC", n.Resume = "RESUME", n.Die = "DIE", (e = s = t.GameState || (t.GameState = {})).NormalSpin = "NormalSpin", e.FreeSpins = "FreeSpins", e.BonusPick = "BonusPick" })(Bs || (Bs = {})); class Ds extends Ms.B1 { constructor() { super("CENTER", !1), this.G_ = 0, this.W_ = 1, this.H_ = 1, this.X_ = 2 } init() { super.initBase(), this.V_ = !0, this.Y_ = !0, this.jf = new v.TC, this.jf.beginFill(0, .5), this.jf.drawRect(-n.AppConfig.BASE_SCREEN_WIDTH / 2, -n.AppConfig.MAX_CANVAS_HEIGHT / 2, n.AppConfig.BASE_SCREEN_WIDTH, n.AppConfig.MAX_CANVAS_HEIGHT), this.jf.endFill(), this.jf.hitArea = new r.Ae(-n.AppConfig.BASE_SCREEN_WIDTH / 2, -n.AppConfig.MAX_CANVAS_HEIGHT / 2, n.AppConfig.BASE_SCREEN_WIDTH, n.AppConfig.MAX_CANVAS_HEIGHT), this.jf.interactive = !0, this.containerBG.addChild(this.jf), this.z_ = new E.PY(n.ResourceManager.getSpine("buy_feat")), this.container.addChild(this.z_), this.K_ = new p.Xz(i.JK.currencyFormatAmount(40), { fontName: M.Font.FONT_IN_BUY_FEATURE, fontSize: 30, align: "center" }), this.K_.anchor.set(.5), this.K_.position.y = 20, this.K_.scale.y = -1; const t = this.z_.skeleton.findSlotIndex("track_buyfeat_amt"); this.z_.slotContainers[t].addChild(this.K_), this.q_ = new c.j, this.q_.hitArea = new r.Ae(-100, -30, 200, 60), this.q_.interactive = !0, this.q_.buttonMode = !0; const e = this.z_.skeleton.findSlotIndex("cancel_btn"); this.z_.slotContainers[e].addChild(this.q_), this.q_.on("pointertap", (() => { if (this.Y_) { this.Y_ = !1, this.V_ = !1, s.getInst().playSfx("UI_BUTTON_BUY_FEATURE_CANCEL"), this.z_.state.getCurrent(this.H_) && this.z_.stateData.setMix(this.z_.state.getCurrent(this.H_).animation.name, "cancel_press", .25); this.z_.state.setAnimation(this.H_, "cancel_press", !1); this.z_.state.addAnimation(this.H_, "cancel_idle", !1, 0), s.getInst().playSfx("SFX_BUY_FEATURE_ANI_CANCEL"), this.z_.stateData.setMix(this.z_.state.getCurrent(this.G_).animation.name, "board_out1", .3), this.z_.state.setAnimation(this.G_, "board_out1", !1), Ts.isEnable = !0, this.close() } })), this.q_.on("pointerover", (() => { this.Y_ && (this.z_.state.getCurrent(this.H_) && this.z_.stateData.setMix(this.z_.state.getCurrent(this.H_).animation.name, "cancel_hover", .25), this.z_.state.setAnimation(this.H_, "cancel_hover", !0)) })), this.q_.on("pointerout", (() => { this.Y_ && (this.z_.state.getCurrent(this.H_) && this.z_.stateData.setMix(this.z_.state.getCurrent(this.H_).animation.name, "cancel_idle", .25), this.z_.state.setAnimation(this.H_, "cancel_idle", !0)) })), this.Z_ = new c.j, this.Z_.hitArea = new r.Ae(-100, -30, 200, 60), this.Z_.interactive = !0, this.Z_.buttonMode = !0; const h = this.z_.skeleton.findSlotIndex("start_btn"); this.z_.slotContainers[h].addChild(this.Z_), this.Z_.on("pointertap", (() => { if (this.V_) { this.V_ = !1, this.Y_ = !1, Bs.getInst().buyFeature(), s.getInst().playSfx("SFX_BUY_FEATURE_ANI_START"), this.z_.state.getCurrent(this.X_) && this.z_.stateData.setMix(this.z_.state.getCurrent(this.X_).animation.name, "start_press", .25); const t = 1e3 * this.z_.state.setAnimation(this.X_, "start_press", !1).animation.duration; this.z_.state.addAnimation(this.X_, "start_idle", !1, 0), i.b2.setTimeout(t - 400, (() => { this.z_.state.getCurrent(this.G_) && this.z_.stateData.setMix(this.z_.state.getCurrent(this.G_).animation.name, "board_out2", .3), this.z_.state.setAnimation(this.G_, "board_out2", !1) })) } })), this.Z_.on("pointerover", (() => { this.V_ && (this.z_.state.getCurrent(this.X_) && this.z_.stateData.setMix(this.z_.state.getCurrent(this.X_).animation.name, "start_hover", .25), this.z_.state.setAnimation(this.X_, "start_hover", !0)) })), this.Z_.on("pointerout", (() => { this.V_ && (this.z_.state.getCurrent(this.X_) && this.z_.stateData.setMix(this.z_.state.getCurrent(this.X_).animation.name, "start_idle", .25), this.z_.state.setAnimation(this.X_, "start_idle", !0)) })) } open() { super.open(), Ts.isEnable = !1, i.b2.setTimeout(300, (() => { s.getInst().playSfx("SFX_BUY_FEATURE_ANI_SPAWN") })); const t = I.kc.getInst(), n = t.totalBet * t.gameInfo.setting.buyFeature[0], e = t.selectedDenomination, r = t.gameInfo.buyFeatureSetting, h = r.maxBuyDenoms && r.maxBuyDenoms[0] || e + .1; this.K_.text = i.JK.currencyFormatAmount(n), i.cQ.fitFontSizeByCharacter(this.K_, this.K_.text, [{ digits: 14, fontSize: 15, pos: this.K_.position }, { digits: 12, fontSize: 18, pos: this.K_.position }, { digits: 11, fontSize: 21, pos: this.K_.position }, { digits: -1, fontSize: 20, pos: this.K_.position }]), i.b2.setTimeout(100, (() => { this.z_.state.setAnimation(this.G_, "board_in", !1), this.z_.state.addAnimation(this.G_, "board_loop", !0, 0) })), this.z_.state.setAnimation(this.H_, "cancel_idle", !1), n <= Re.getInst().getSpinPanel().getCurrentBalanceShow() && e <= h ? (this.V_ = !0, this.Z_.buttonMode = !0, this.z_.state.setAnimation(this.X_, "start_idle", !1)) : (this.V_ = !1, this.Z_.buttonMode = !1, this.z_.state.setAnimation(this.X_, "start_dim", !1)), this.Y_ = !0 } close() { super.close() } resetCanBuy() { i.b2.setTimeout(1e3, (() => { this.V_ = !0 })) } callSuccessEnterFG() { this.close() } } const js = class extends Ms.Cg { constructor() { super(...arguments), this.autoSpinMenuPopup = null, this.bigwinPopup = null, this.buyFeaturePopup = null, this.resumeGamePopup = null } static getInst() { return js.vu || (js.vu = new js, Ms.Cg.popupMgr = js.vu), js.vu } initializePopups() { this.J_(), this.Q_(), this.tp(), this.np(), super.initializePopups(), this.ep() } ep() { Re.getInst().addPopup(this.autoSpinMenuPopup), Re.getInst().addPopup(this.questionPopup), Re.getInst().addPopup(this.networkDisconnectedPopup), Re.getInst().addPopup(this.networkDisconnectedPopup), Re.getInst().addPopup(this.networkRetryNotification), Re.getInst().addPopup(this.resumeGamePopup), Re.getInst().addPopup(this.bigwinPopup), Re.getInst().addPopup(this.loadingResourcePopup), Re.getInst().addPopup(this.buyFeaturePopup), n.MultiResolutionHandler.getInst().onResize() } onPause() { this.bigwinPopup && this.bigwinPopup.onPause() } onResume() { this.bigwinPopup && this.bigwinPopup.onResume() } J_() { this.autoSpinMenuPopup = new Is, this.autoSpinMenuPopup.init() } Q_() { this.resumeGamePopup = new Ns, this.resumeGamePopup.init({ color: 0, alpha: .75 }, { text: "", style: new m.pn({ fontFamily: M.Popup.POPUP_CUSTOM_TEXT_FONT, fontSize: M.Popup.POPUP_TXT_FONT_SIZE + 5, fontWeight: M.Popup.POPUP_TXT_FONT_WEIGHT, fill: "0xffc133", wordWrap: !0, wordWrapWidth: 440, align: "center" }) }) } tp() { this.bigwinPopup = new Cs, this.bigwinPopup.init({ color: 0, alpha: .9 }, "bigwinFlare", "bigwinText", Ls.BIGWIN) } np() { this.buyFeaturePopup = new Ds, this.buyFeaturePopup.init() } }; let Gs = js; Gs.vu = null; class Ws { constructor() { this.rp = 10855845, this.hp = 16777215, this.op = [800, 300], this.TRACK_INTERIOR_MAIN = 0, this.TRACK_INTERIOR_EFFECT = 1, this.up = 1 } init() { this.Qu = new u.W2; const t = new c.j(n.ResourceManager.getTexture("reel_background_mg")); t.position.set(0, -200), t.anchor.set(.5), this.Qu.addChild(t), this.ap = t; const i = new c.j(n.ResourceManager.getTexture("maingame_bg")); i.name = "MainBg", i.anchor.set(.5, .5), this.lp = i, this.cp = new E.PY(n.ResourceManager.getSpine("mg_base_idle")), this.cp.name = "MgBaseIdle", this.cp.state.setAnimation(this.TRACK_INTERIOR_MAIN, "idle", !0), this.fp = new E.PY(n.ResourceManager.getSpine("fg_base_glow")), this.fp.name = "FgBaseIdle", this.vp = new E.PY(n.ResourceManager.getSpine("freegame_sparks")), this.vp.name = "FgSparks", this.dp = new p.Xz("0", { fontName: M.Font.FONT_MULTIPLIER, fontSize: 17, align: "center" }), this.dp.anchor.set(.5), this.dp.position.set(0, -51), this.dp.scale.y = -1, this.dp.text = "x1", this._p = new u.W2, this.Qu.addChild(this._p); (new u.W2).position.set(-120, 0), this._p.visible = !1 } getBgLayer() { return this.lp } getBgIdleLayer() { return this.cp } getFgIdleLayer() { return this.fp } getFgSparkLayer() { return this.vp } updateMultiply(t, n = !1) { const s = this.op[n ? 1 : 0]; return this.dp.text = `x${t}`, this.up = t, new Promise((n => { i.b2.setTimeout(s, (() => { n(t) })) })) } zoomEffectMulti() { i.kX.to(200, this.dp, { fontSize: 20 }, 0, (() => { i.kX.to(200, this.dp, { fontSize: 17 }, 0) })) } setDimBG(t) { const s = { color: 255 & this.ap.tint }; i.kX.to(n.AppConfig.gameConfig.SlotStyle.SYMBOL_FADED_DIM_TIME, s, { color: 255 & (t ? this.rp : this.hp) }, 0, null, (() => { this.ap.tint = s.color << 16 & 16711680 | s.color << 8 & 65280 | 255 & s.color })) } playAnimNormalWin(t, i) {} playAnimNoWin() {} activeWinCombine() { var t; null == (t = this.pp) || t.state.setAnimation(1, "win", !1) } updateBackground(t) {} getBgContainer() { return this.Qu } setShowFreegame(t) { t ? (this.lp.texture = n.ResourceManager.getTexture("freegame_bg"), this.ap.texture = n.ResourceManager.getTexture("reel_background_fg"), this.cp.state.setAnimation(this.TRACK_INTERIOR_MAIN, "off", !1), this.fp.state.setAnimation(this.TRACK_INTERIOR_MAIN, "idle", !0), this.vp.state.setAnimation(this.TRACK_INTERIOR_MAIN, "idle", !0), i.b2.setTimeout(1500, (() => { s.getInst().playSfx("SFX_FG_FINISH") })), i.cQ.Rv(this._p)) : (this.lp.texture = n.ResourceManager.getTexture("maingame_bg"), this.ap.texture = n.ResourceManager.getTexture("reel_background_mg"), this.cp.state.setAnimation(this.TRACK_INTERIOR_MAIN, "idle", !0), this.fp.state.setAnimation(this.TRACK_INTERIOR_MAIN, "off", !0), this.vp.state.setAnimation(this.TRACK_INTERIOR_MAIN, "off", !0), i.cQ.Pv(this._p)) } playAnimOutFG() { return t = this, n = null, s = function*() { return new Promise((t => { i.b2.setTimeout(500, (() => { t() })) })) }, new Promise(((i, e) => { var r = t => { try { o(s.next(t)) } catch (t) { e(t) } }, h = t => { try { o(s.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? i(t.value) : Promise.resolve(t.value).then(r, h); o((s = s.apply(t, n)).next()) })); var t, n, s } } class Hs extends u.W2 { constructor() { super(), this.TRACK_MAIN_FREEGAME = 0, this.TRACK_ANIM_FREEGAME = 1, this.TRACK_FREEGAME_BTN = 2, this.TRACK_MAIN_TOTALWIN = 0, this.TRACK_ANIM = 1, this.TRACK_TOTALWIN_BTN = 2, this.TRACK_COIN = 3, this.TRACK_FLARE = 4, this.TIME_COUNT_MONEY = 5e3, this.TIME_DELAY_AFER_COUNT = 2e3, this.TIME_DELAY_AUTO = 6e3, this.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, n.AppConfig.BASE_SCREEN_HEIGHT / 2), this.jf = new v.TC, this.jf.beginFill(0, .5), this.jf.drawRect(-n.AppConfig.BASE_SCREEN_WIDTH / 2, -n.AppConfig.MAX_CANVAS_HEIGHT / 2, n.AppConfig.BASE_SCREEN_WIDTH, n.AppConfig.MAX_CANVAS_HEIGHT), this.jf.endFill(), this.jf.hitArea = new r.Ae(-n.AppConfig.BASE_SCREEN_WIDTH / 2, -n.AppConfig.MAX_CANVAS_HEIGHT / 2, n.AppConfig.BASE_SCREEN_WIDTH, n.AppConfig.MAX_CANVAS_HEIGHT), this.jf.interactive = !0, this.jf.visible = !1, this.addChild(this.jf), this.mp = new E.PY(n.ResourceManager.getSpine("popup_totalwin")), this.mp.visible = !1, this.mp.autoUpdate = !1, this.mp.position.set(0, 0), this.addChild(this.mp), this.bp = new p.Xz("1", { fontName: M.Font.FONT_TRANSCENE_OUT, fontSize: 35, align: "center" }), this.bp.anchor.set(.5), this.bp.scale.y = -1, this.bp.position.set(0, 12); const t = this.mp.skeleton.findSlotIndex("track_freespin"); this.mp.slotContainers[t].addChild(this.bp), this.wp = new E.PY(n.ResourceManager.getSpine("popup_freespin")), this.wp.visible = !1, this.wp.autoUpdate = !1, this.wp.position.set(0, 0), this.addChild(this.wp), this.gp = new p.Xz("5", { fontName: M.Font.FONT_TRANSCENE_IN, fontSize: 30, align: "center" }), this.gp.anchor.set(.5), this.gp.position.set(0, -90), this.gp.scale.set(1, -1); const e = this.wp.skeleton.findSlotIndex("track_fs_amt"); this.wp.slotContainers[e].addChild(this.gp), this.yp = new E.PY(n.ResourceManager.getSpine("popup_retrigger")), this.yp.visible = !1, this.yp.autoUpdate = !1, this.yp.position.set(0, 0), this.addChild(this.yp), this.Ep = new p.Xz("5", { fontName: M.Font.FONT_TRANSCENE_IN, fontSize: 22, align: "center" }), this.Ep.anchor.set(.5), this.Ep.position.set(0, -60), this.Ep.scale.set(1, -1); const h = this.yp.skeleton.findSlotIndex("track_fs_amt"); this.yp.slotContainers[h].addChild(this.Ep), this.Sp = new c.j, this.Sp.interactive = !1, this.Sp.buttonMode = !1, this.Sp.hitArea = new r.Ae(-270, -100, 540, 200), this.Sp.position.y = 510, this.Sp.on("pointertap", (() => { s.getInst().playSfx("UI_BUTTON_FG_START"), this.hideEnterFreeGame() })), this.wp.stateData.setMix("button_idle", "button_hover", .25), this.wp.stateData.setMix("button_hover", "button_press", .25), this.Sp.on("pointerover", (() => { this.wp.state.setAnimation(this.TRACK_FREEGAME_BTN, "button_hover", !1) })), this.Sp.on("pointerout", (() => { this.wp.state.setAnimation(this.TRACK_FREEGAME_BTN, "button_idle", !1) })), this.wp.addChild(this.Sp), Re.getInst().overlayBoardContainer.addChild(this), this.Ap = new p.Xz(i.JK.currencyFormatAmount(0), { fontName: M.Font.FONT_TOTAL_WIN, align: "center", fontSize: 30 }), this.Ap.visible = !1, this.Ap.anchor.set(.5), this.Ap.position.set(0, -180), this.mp.addChild(this.Ap), this.Tp = new c.j, this.Tp.interactive = !1, this.Tp.buttonMode = !1, this.Tp.hitArea = new r.Ae(-270, -100, 540, 200), this.Tp.position.y = 510, this.Tp.on("pointertap", (() => { this.hideTotalWin(), s.getInst().playSfx("UI_BUTTON_FG_COLLECT") })), this.Tp.on("pointerover", (() => { this.mp.state.setAnimation(this.TRACK_TOTALWIN_BTN, "button_hover", !0) })), this.Tp.on("pointerout", (() => { this.mp.state.setAnimation(this.TRACK_TOTALWIN_BTN, "button_idle", !0) })), this.mp.addChild(this.Tp) } showTotalWin(t, e) { return new Promise((r => { s.getInst().stop("FREEGAME_MUSIC"), s.getInst().playSfx("SFX_TOTAL_WIN"), n.AppState.pushState(n.AppState.State.Popup), this.mp.interactive = !0, this.bp.text = e ? e.toString() : "0", this.bp.parent.visible = !0, this.bp.visible = !0, this.mp.visible = !0, this.jf.visible = !0, this.mp.state.setAnimation(this.TRACK_MAIN_TOTALWIN, "idle", !0); const h = 1e3 * this.mp.state.setAnimation(this.TRACK_ANIM, "transcene_in", !1).animation.duration; i.b2.setTimeout(h, (() => { this.mp.stateData.setMix("transcene_in", "transcene_loop", .3), this.mp.state.addAnimation(this.TRACK_ANIM, "transcene_loop", !0, 0) })), this.mp.stateData.setMix("button_idle", "button_hover", .25), this.mp.stateData.setMix("button_hover", "button_press", .25), this.mp.state.setAnimation(this.TRACK_FREEGAME_BTN, "button_idle", !0), i.b2.setTimeout(h - 500, (() => { this.Ap.parent.visible = !0, this.Ap.visible = !0, this.Mp = t; const n = { r: 0 }; this.mp.state.setAnimation(this.TRACK_COIN, "coin", !0), this.mp.state.setAnimation(this.TRACK_FLARE, "flare", !0), s.getInst().playSfx("SFX_WINNING_INCREMENT", 1, !0), i.kX.to(M.Popup.TIME_TOTALWIN_COUNT_MONEY, n, { r: t }, 0, (() => { this.Ap.text = i.JK.currencyFormatAmount(t), i.cQ.fitFontSizeByCharacter(this.Ap, i.JK.currencyFormatAmount(t), [{ digits: 11, fontSize: 20, pos: this.Ap.position }, { digits: 9, fontSize: 25, pos: this.Ap.position }, { digits: -1, fontSize: 30, pos: this.Ap.position }]), this.mp.stateData.setMix("coin", "coin_off", .75), this.mp.stateData.setMix("flare", "flare_off", .75), this.mp.state.addAnimation(this.TRACK_COIN, "coin_off", !1, 0), this.mp.state.addAnimation(this.TRACK_FLARE, "flare_off", !1, 0), this.Tp.interactive = !0, this.Tp.buttonMode = !0, this.mp.interactive = !1, s.getInst().stop("SFX_WINNING_INCREMENT") }), (() => { this.Ap.text = i.JK.currencyFormatAmount(n.r), i.cQ.fitFontSizeByCharacter(this.Ap, i.JK.currencyFormatAmount(t), [{ digits: 11, fontSize: 20, pos: this.Ap.position }, { digits: 9, fontSize: 25, pos: this.Ap.position }, { digits: -1, fontSize: 30, pos: this.Ap.position }]) })), this.Op = r, this.Ip = i.b2.setTimeout(M.Popup.TIME_TOTALWIN_COUNT_MONEY + this.TIME_DELAY_AUTO, (() => { this.hideTotalWin() })) })) })) } showEnterFreeGame(t) { return new Promise((e => { s.getInst().stop("NORMAL_MUSIC"), s.getInst().playSfx("SFX_FG_CUTSCENE"), n.AppState.pushState(n.AppState.State.Popup), ge.getInst().turboModeOption(!1), this.gp.text = t.toString(), Re.getInst().getSpinPanel().updateFreegameRemain(t), this.jf.visible = !0, this.wp.visible = !0, this.wp.stateData.setMix("transcene_in", "transcene_loop", .25), this.wp.stateData.setMix("transcene_loop", "transcene_out", .25); const r = 1e3 * this.wp.state.setAnimation(this.TRACK_MAIN_FREEGAME, "transcene_in", !1).animation.duration; this.wp.state.addAnimation(this.TRACK_MAIN_FREEGAME, "transcene_loop", !0, 0), this.wp.state.setAnimation(this.TRACK_ANIM_FREEGAME, "idle", !0), i.b2.setTimeout(r, (() => { this.Sp.interactive = !0, this.Sp.buttonMode = !0, this.Op = e })), this.Np = i.b2.setTimeout(this.TIME_DELAY_AUTO, (() => { this.hideEnterFreeGame() })) })) } showRetrigger(t) { return new Promise((e => { n.AppState.pushState(n.AppState.State.Popup), this.Ep.text = t.toString(), this.Ep.visible = !0, this.yp.visible = !0, this.yp.state.setAnimation(1, "particle_idle", !0); let r = 1e3 * this.yp.state.setAnimation(0, "retrigger_in", !1).animation.duration; r += 1e3 * this.yp.state.addAnimation(0, "retrigger_loop", !0, 0).animation.duration, s.getInst().playSfx("SFX_RETRIGGER"), i.b2.setTimeout(r, (() => { i.cQ.Pv(this.Ep, 500); const t = 1e3 * this.yp.state.setAnimation(0, "retrigger_out", !1).animation.duration; this.yp.state.setAnimation(1, "particle_off", !1), i.b2.setTimeout(t, (() => { this.yp.visible = !1, e() })) })) })) } playFreeGameMusic() { s.getInst().isPlaying("FREEGAME_MUSIC") || s.getInst().playMusic("FREEGAME_MUSIC", "BGM") } hideTotalWin() { this.Ip && (i.b2.clearTimeout(this.Ip), this.Ip = null), ge.getInst().turboModeOption(globalThis.isTurbo), this.Tp.interactive = !1, this.Tp.buttonMode = !1, M.RuntimeData.isBackFromFreegame = !0; const t = 1e3 * this.mp.state.setAnimation(this.TRACK_TOTALWIN_BTN, "button_press", !1).animation.duration; i.b2.setTimeout(t, (() => { i.cQ.Pv(this.Ap, 300, (() => { this.jf.visible = !1 }), !0), this.mp.stateData.setMix("transcene_loop", "transcene_out", .3), this.mp.stateData.setMix("transcene_out", "off", .3), this.mp.state.setAnimation(this.TRACK_ANIM, "transcene_out", !1), this.mp.state.addAnimation(this.TRACK_ANIM, "off", !1, 0), i.b2.setTimeout(t, (() => { this.bp.visible = !1, this.mp.visible = !1, i.cQ.cleanSpine(this.mp), n.AppState.popState(), Re.getInst().getSpinPanel().updateWinAmount(this.Mp), this.Op() })), s.getInst().isPlaying("NORMAL_MUSIC") || s.getInst().playMusic("NORMAL_MUSIC", "BGM", 0, ((t, i, n, s, e) => { t.fade(i, 0, "AUTO", M.Control.FADEIN_MAIN_GAME_MUSIC, !1) })), Re.getInst().updateBalance(I.kc.getInst().balance), this.mp.state.addAnimation(this.TRACK_TOTALWIN_BTN, "button_idle", !0, 0) })) } hideEnterFreeGame() { this.Np && (i.b2.clearTimeout(this.Np), this.Np = null), Re.getInst().getSpinPanel().setInteractivePanel(!1), this.Sp.interactive = !1, this.Sp.buttonMode = !1, this.jf.visible = !1, Re.getInst().getSpinPanel().setShowFreeGameUI(!0), ge.getInst().getGameBoard().getBoardBackground().setShowFreegame(!0), ge.getInst().getGameBoard().getNormalGameSpine().updateUIFreegame(!0), ge.getInst().getGameBoard().getBoardBackground().updateMultiply(M.Control.DEFAULT_START_MULTIPLER_FREEGAME, !0); const t = 1e3 * this.wp.state.setAnimation(this.TRACK_FREEGAME_BTN, "button_press", !1).animation.duration; i.b2.setTimeout(t, (() => { s.getInst().playSfx("SFX_FG_CUTSCENE_AWAY"), this.wp.stateData.setMix("idle", "off", .1); const t = 1e3 * this.wp.state.setAnimation(this.TRACK_MAIN_FREEGAME, "transcene_out", !1).animation.duration; this.wp.state.setAnimation(this.TRACK_ANIM_FREEGAME, "off", !0), i.b2.setTimeout(t, (() => { this.playFreeGameMusic(), this.wp.visible = !1, n.AppState.popState(), n.AppState.pushState(n.AppState.State.MiniGame), this.Op() })) })), this.wp.state.addAnimation(this.TRACK_FREEGAME_BTN, "button_idle", !1, 0), M.RuntimeData.currentFGWin = 0, M.RuntimeData.last_fgAccumTotalWin = 0 } update(t) { this.mp.visible && this.mp.update(t), this.wp && this.wp.update(t), this.yp && this.yp.update(t) } } class Xs extends u.W2 { constructor() { super(), this.TRACK_INTERIOR_MAIN = 0, this.TRACK_INTERIOR_EFFECT = 1, this.Rp = null, this.Pp = 1, this.Rp = new E.PY(n.ResourceManager.getSpine("multiplier")), this.Rp.position.y = 0, this.Rp.state.setAnimation(this.TRACK_INTERIOR_MAIN, "mg", !0), ge.getInst().getGameBoard().addChild(this.Rp), ge.getInst().getGameBoard().getSlotMachine().getContainerDeco().addChild(this), this.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, n.AppConfig.BASE_SCREEN_HEIGHT / 2) } setToTop() { Re.getInst().makeTop(this), this.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, n.AppConfig.BASE_SCREEN_HEIGHT / 2) } updateUIFreegame(t) { this.Rp.state.setAnimation(this.TRACK_INTERIOR_MAIN, t ? "fg" : "mg", !0) } updateMaxWay(t, i = !1) {} updateReelWay(t) {} resetCombo() { this.Pp = 1 } getExteriorSpine() { return this.Rp } playMulIdle(t) { var i, n, s, e, r, h, o, u, a, l, c; if (t.freeGame) { let o = 0; (null == (n = null == (i = t.featureResults) ? void 0 : i.multiplierList) ? void 0 : n.multiplier) ? o = null == (e = null == (s = t.featureResults) ? void 0 : s.multiplierList) ? void 0 : e.mulCurr: (o = null == (h = null == (r = t.freeGame) ? void 0 : r.respinGame) ? void 0 : h.multiplier, 10 == o && t.respinReq > 0 || (10 == o ? o = 6 : o -= 2)), this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, 10 == o && t.freeGame.respinGame.respinReq > 0 ? "mul4_idle" : 6 == o ? "mul3_idle" : 4 == o ? "mul2_idle" : "mul1_idle", !0) } else { let i = 0; (null == (u = null == (o = t.featureResults) ? void 0 : o.multiplierList) ? void 0 : u.multiplier) ? i = null == (l = null == (a = t.featureResults) ? void 0 : a.multiplierList) ? void 0 : l.mulCurr: (i = null == (c = t.respinGame) ? void 0 : c.multiplier, 5 == i && t.respinReq > 0 || (5 == i ? i = 3 : i -= 1)), this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, 5 == i && t.respinReq > 0 ? "mul4_idle" : 3 == i ? "mul3_idle" : 2 == i ? "mul2_idle" : "mul1_idle", !0) } } playUpMul(t) { var i, n, e, r, h, o, u, a, l, c, f; if (s.getInst().playSfx("SFX_MULTIPLIER"), t.freeGame) { let u = 0; u = (null == (n = null == (i = t.featureResults) ? void 0 : i.multiplierList) ? void 0 : n.multiplier) ? null == (r = null == (e = t.featureResults) ? void 0 : e.multiplierList) ? void 0 : r.multiplier : null == (o = null == (h = t.freeGame) ? void 0 : h.respinGame) ? void 0 : o.multiplier, 10 == u ? (s.getInst().playSfx("VO_SHI_BEI"), this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul4_in", !1), this.Rp.state.addAnimation(this.TRACK_INTERIOR_EFFECT, "mul4_idle", !0, 0)) : 6 == u ? (s.getInst().playSfx("VO_LIU_BEI"), this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul3_in", !1), this.Rp.state.addAnimation(this.TRACK_INTERIOR_EFFECT, "mul3_idle", !0, 0)) : 4 == u && (s.getInst().playSfx("VO_SI_BEI"), this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul2_in", !1), this.Rp.state.addAnimation(this.TRACK_INTERIOR_EFFECT, "mul2_idle", !0, 0)) } else { let i = 0; i = (null == (a = null == (u = t.featureResults) ? void 0 : u.multiplierList) ? void 0 : a.multiplier) ? null == (c = null == (l = t.featureResults) ? void 0 : l.multiplierList) ? void 0 : c.multiplier : null == (f = t.respinGame) ? void 0 : f.multiplier, 5 == i ? (s.getInst().playSfx("VO_WU_BEI"), this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul4_in", !1), this.Rp.state.addAnimation(this.TRACK_INTERIOR_EFFECT, "mul4_idle", !0, 0)) : 3 == i ? (s.getInst().playSfx("VO_SAN_BEI"), this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul3_in", !1), this.Rp.state.addAnimation(this.TRACK_INTERIOR_EFFECT, "mul3_idle", !0, 0)) : 2 == i && (s.getInst().playSfx("VO_LIANG_BEI"), this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul2_in", !1), this.Rp.state.addAnimation(this.TRACK_INTERIOR_EFFECT, "mul2_idle", !0, 0)) } } playDefaultMul() { this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul1_idle", !0) } playMulAnim(t) { var i, n, s, e, r, h, o, u, a, l, c; if (t.freeGame) { let o = 0; (null == (n = null == (i = t.featureResults) ? void 0 : i.multiplierList) ? void 0 : n.multiplier) ? o = null == (e = null == (s = t.featureResults) ? void 0 : s.multiplierList) ? void 0 : e.mulCurr: (o = null == (h = null == (r = t.freeGame) ? void 0 : r.respinGame) ? void 0 : h.multiplier, 10 == o && t.respinReq > 0 || (10 == o ? o = 6 : o -= 2)), 10 == o && t.freeGame.respinGame.respinReq > 0 || 10 == o ? this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul4_win", !1) : 6 == o ? this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul3_win", !1) : 4 == o ? this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul2_win", !1) : 2 == o && this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul1_win", !1) } else { let i = 0; (null == (u = null == (o = t.featureResults) ? void 0 : o.multiplierList) ? void 0 : u.multiplier) ? i = null == (l = null == (a = t.featureResults) ? void 0 : a.multiplierList) ? void 0 : l.mulCurr: (i = null == (c = t.respinGame) ? void 0 : c.multiplier, 5 == i && t.respinReq > 0 || (5 == i ? i = 3 : i -= 1)), 5 == i && t.respinReq > 0 || 10 == i ? this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul4_win", !1) : 3 == i ? this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul3_win", !1) : 2 == i ? this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul2_win", !1) : 1 == i && this.Rp.state.setAnimation(this.TRACK_INTERIOR_EFFECT, "mul1_win", !1) } } } var Vs = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); class $s extends n.ResourceAsyncLoader { constructor() { super(), this.Qu = new u.W2, this.xp = new v.TC, this.xp.beginFill(16777215, .01), this.xp.drawRect(0, 0, n.AppConfig.BASE_SCREEN_WIDTH, n.AppConfig.MAX_CANVAS_HEIGHT), this.xp.endFill(), this.xp.interactive = !0, this.xp.visible = !1, this.Qu.addChild(this.xp), this.Lu("lion_emblem", (t => { this.Lp = new E.PY(t), this.Lp.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, n.AppConfig.BASE_SCREEN_HEIGHT / 2 - 200), this.Qu.addChild(this.Lp) })), this.Lu("transcene_in", (t => { this.Cp = new E.PY(t), this.Cp.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, n.AppConfig.BASE_SCREEN_HEIGHT / 2), this.Qu.addChild(this.Cp) })), Re.getInst().overlayBoardContainer.addChild(this.Qu) } playToBonusGame() { return Vs(this, null, (function*() { return this.xp.visible = !0, i.zW.emit(i.qM.ACTIVE_BONUS_GAMES), n.AppState.pushState(n.AppState.State.MiniGame), yield this.ku(), new Promise((t => { s.getInst().fade("NORMAL_MUSIC", "AUTO", 0, 500, !1), this.Lp.visible = !0, this.Cp.visible = !0, this.Lp.state.setAnimation(0, "ttsin", !1); const n = 1e3 * this.Cp.state.setAnimation(0, "ttsin", !1).animation.duration; i.b2.setTimeout(n, (() => { this.Lp.visible = !1, this.Cp.visible = !1 })), i.b2.setTimeout(n - 2e3, (() => { t(), this.xp.visible = !1 })) })) })) } showLoadResourcePopup() { return Vs(this, null, (function*() { return new Promise((t => { Ms.Cg.popupMgr.loadingResourcePopup.open(n.Localization.getText("TXT_DOWN"), -1, (() => { t() }), this) })) })) } } const Ys = class extends u.W2 { constructor() { super(...arguments), this.kp = [], this.Fp = !1 } init(t, i, n, s = !1, e = !1) { this.Bp = t, this.Dp = i, this.jp = n, this.Gp = s, this.Fp = e, this.Wp = Ys.Hp, Ys.Hp++, this.Xp(), this.mask = this.Vp } getSymbols() { return this.kp } getSymbol(t) { return this.kp && t < this.kp.length ? this.kp[t] : null } getReelIndex() { return this.Wp } getSymbolIndex(t) { return this.kp.indexOf(t) } getNumberShowRow() { return this.Bp } getNumberOfSymbols() { return this.kp.length } addSymbol(t, i = !1) { this.kp.push(t), this.Gp && (t.rotation -= Math.PI / 2, this.Fp || (t.rotation -= Math.PI)), i && this.addChild(t) } update(t) { this.kp.forEach((i => { i.update(t) })) } onPause() { this.kp.forEach((t => { t.onPause() })) } onResume() { this.kp.forEach((t => { t.onResume() })) } setSymbolKeletonAutoUpdate(t) { this.kp.forEach((i => { i.setSkeletonAutoUpdate(t) })) } unhighlightAllSymbols() { this.kp.forEach((t => { t.unhighlightSymbol() })) } resetAllDrawOrderSymbol(t = 0) { this.kp.forEach((i => { i.zIndex = t })) } setDrawOrderSymbol(t, i) { this.kp[t].zIndex = i } setOrderDisplay() {} resetAllSymbol() {} showStaticImageSymbols() { this.kp.forEach((t => { t.showStaticImageSymbol() })) } setDimAllSymbol(t = !0, i = !1) { this.kp.forEach((n => { n.setDimSymbol(t, i) })) } setNearWinDimAllSymbol(t = !0) { this.kp.forEach((i => { i.showNearWinDim(t) })) } playWin(t, i = !1) { this.kp[t].playWinAnim(i) } playExplode(t, i = !1) { this.kp[t].playExplodeAnim(i) } playExplodeDir(t, i = !1, n = 1) { this.kp[t].playExplodeDirAnim(i) } playLineWin(t, i = !1, n = !0) { this.kp[t].playLineWinAnim(i, n) } playHightlightAnim(t, i = !1) { this.kp[t].playHightlightAnim(i) } replayHightlightAnim(t) { this.kp[t].replayHightlightAnim() } setDimSymbol(t, i = !0, n = !1) { this.kp[t].setDimSymbol(i, n) } updateCascadeAllSymbolPos(t = !1) { for (let i = this.kp.length - 1; i >= 0; i--) if (this.kp[i].isBreakInCascade) { const n = this.kp.splice(i, 1).pop(), s = this.kp[this.kp.length - 1]; n.isBreakInCascade = !1, n.setPosition(s.x, s.y + s.megaHeight / 2 + n.megaHeight / 2), n.resetStateSymbol(), n.isInResultShow = !1, n.visible = t, this.kp.push(n) } this.sortChildren() } disableClipping() { (!n.AppConfig.gameConfig.GameBoard.ALWAYS_ENABLE_CLIPPING && n.AppConfig.gameConfig.GameBoard.CLIPPING_MASK_TYPE === n.MaskType.REEL || this.Gp) && (this.mask = void 0, this.Vp.renderable = !1); for (let t = 0; t < this.Dp; t++) this.kp[t].setVisible(this.kp[t].isInResultShow) } enableClipping() { n.AppConfig.gameConfig.GameBoard.ALWAYS_ENABLE_CLIPPING || n.AppConfig.gameConfig.GameBoard.CLIPPING_MASK_TYPE !== n.MaskType.REEL || (this.Vp.renderable = !0, this.mask = this.Vp); for (let t = 0; t < this.Dp; t++) this.kp[t].setVisible(!0) } Xp() { this.Vp = new v.TC, this.Vp.name = "reelClippingMask", this.addChild(this.Vp), this.Vp.x = this.x, this.Vp.y = this.y - (this.Bp / 2 + 1) * this.jp.height, this.$p(0) } $p(t = 0) { const i = this.jp.width + 8; this.Vp.clear(), this.Vp.beginFill(9160191, .4), this.Vp.drawRect(-i / 2, -t / 2 + 0, i, this.jp.height * this.Bp + t / 2 - 0) } }; let zs = Ys; zs.Hp = 0; class Ks extends u.W2 { constructor() { super(...arguments), this.hp = 16777215, this.Yp = 0, this.zp = 1, this.Kp = 2, this.qp = 0, this.Zp = 1, this.Jp = 2, this.Qp = 3, this.tm = !0, this.Oo = new c.j, this.im = null, this.nm = null, this.sm = null, this.rm = !1, this.hm = !1, this.om = [], this.um = !1, this.am = !0 } get megaHeight() { return this.lm } set megaHeight(t) { this.lm = t } get type() { return n.AppConfig.gameConfig.BE_RESPONSE_FORMAT === n.ResponseFormat.MEGA_SYMBOL ? this.fm.s : this.Gf } set type(t) { this.Gf !== t && (this.resetSymbol(t), this.Gf = t) } get megaSymbol() { return this.fm } vm() { return null === this.im && (this.im = n.SymbolSpinePoolMgr.getInst().getSymbolSpineByKey(this.type), this.addChild(this.im), this.im.position.set(0, 0), this.im.visible = !1, this.dm(this.type)), this.im } init(t, i = !1, s = 0, e) { this.addChild(this.Oo), this.tm && (this._m = new c.j, this.Oo.addChild(this._m), this._m.anchor.set(.5)), this.Oo.anchor.set(.5), this.pm = i, this.Wp = s, this.bm = !1, this.wm = e, this.loadSymbol(t), n.AppConfig.gameConfig.SymbolType.isOnTop(this.type) && (this.zIndex = 2), this.rp = n.AppConfig.gameConfig.GameBoard.SYMBOL_DIM_COLOR; const h = n.AppConfig.gameConfig.GameBoard.SYMBOL_WIDTH, o = n.AppConfig.gameConfig.GameBoard.SYMBOL_HEIGHT; this.hitArea = new r.Ae(-h / 2, -o / 2, h, o), this.on("pointerup", this.onClick.bind(this)), this.interactive = !0 } loadSymbol(t) { let s = t; if (this.isInResultShow = s !== n.AppConfig.gameConfig.SymbolType.SymbolNull, this.isInResultShow || (s = i.cQ.gameUtils.getSymbolOutside(this.pm, this.fm, this.Wp)), this.Gf = s, n.AppConfig.gameConfig.BE_RESPONSE_FORMAT === n.ResponseFormat.MEGA_SYMBOL) { const t = s.split("_"), i = this.pm ? n.AppConfig.gameConfig.GameBoard.SYMBOL_HORIZONTAL_WIDTH : n.AppConfig.gameConfig.GameBoard.SYMBOL_HEIGHT; if (this.fm = { s: t[this.qp], r: t[this.Zp], f: t[this.Jp], m: t[this.Qp] }, this.fm.r && Number(this.fm.r)) { this.lm = (n.AppConfig.gameConfig.SymbolLevelList[n.AppConfig.gameConfig.SymbolLevelList.length - 1] - Number(this.fm.r) + 1) * i } } else this.lm = n.AppConfig.gameConfig.GameBoard.SYMBOL_HEIGHT; this.showBlur(this.gm), this.setDimSymbol(!1, !0), this.showNearWinDim(this.ym) } resetSymbol(t) { if (this.bm = !1, this.Oo.visible = !0, this.im && (this.im.visible = !1), this.Gf !== t) { const s = n.AppConfig.gameConfig.SLOT_TYPE === n.SlotType.LINE_GAME ? this.type : this.megaSymbol.s; this.im && (i.S9.Reset(this.im), this.removeChild(this.im), this.Em(), n.SymbolSpinePoolMgr.getInst().returnSymbolSpine(s, this.im), this.im = null), this.loadSymbol(t), this.zIndex = n.AppConfig.gameConfig.SymbolType.isOnTop(s) ? 2 : 0 } else this.showBlur(this.gm), this.isInResultShow = !0; this.Sm() } update(t) {} setPosition(t, i) { this.position.set(t, i) } onPause() { this.im && (this.rm = this.im.visible, this.im.visible = !1), this.hm = this.Oo.visible, this.Oo.visible = !0 } onResume() { this.im && (this.im.visible = this.rm), this.Oo.visible = this.hm } setVisible(t) { this.visible = t } setSkeletonAutoUpdate(t) { this.im && (this.im.autoUpdate = t) } onClick() {} highlightSymbol() { this.bm = !0 } unhighlightSymbol() { this.bm = !1 } showScore(t, i) {} isNormalSymbol() { return !1 } setAnimSpeed(t) { this.im && (this.im.state.timeScale = t) } showNearWinDim(t) { this.ym = t, this.Oo.tint = t ? this.rp : this.hp, this.tm && (this._m.tint = t ? this.rp : this.hp), this.vm().tint = t ? this.rp : this.hp, t || this.unhighlightSymbol() } Am() { const t = this.Gf.split("_"); this.Oo.texture = this.Tm(`${t[this.qp]}_${t[this.Zp]}`, this.gm ? this.pm ? "hblur" : "blur" : "normal"), this.tm && (this._m.texture = this.Mm(this.megaSymbol.f, this.megaSymbol.r, this.gm ? this.pm ? "hblur" : "blur" : "normal")) } showBlur(t) { t && this.showSymbolIdleAnim(!1), this.gm = t, this.Am(), this.Oo.scale.set(t ? 2 : 1) } Om() { const t = this.vm(), i = "idle"; t.state.setAnimation(this.Yp, `sym_${this.fm.r}`, !1), t.skeleton.data.findAnimation("in") ? (t.state.setAnimation(this.zp, "in", !1), t.state.addAnimation(this.zp, i, !0, 0)) : t.state.setAnimation(this.zp, i, !0) } Im() { if (!n.AppConfig.gameConfig.GameBoard.BOARD_REAL_SYMBOL_MAPPING || !0 === n.AppConfig.gameConfig.GameBoard.BOARD_ACTIVE_IDLE_ON_FAKE_SYMBOL) return !0; const t = this.wm(this); return n.AppConfig.gameConfig.GameBoard.BOARD_REAL_SYMBOL_MAPPING[this.Wp][t - 1] || !1 } showSymbolIdleAnim(t) { if (t && this.Im()) if (!i.cQ.gameUtils.checkSymbolHaveIdleAnim(this.type) || this.im && this.im.visible || !this.isInResultShow) i.cQ.gameUtils.checkSymbolHaveIdleAnim(this.type) || (this.im && (this.im.visible = !1), this.Oo.visible = !0); else { this.vm().visible = !0, this.Oo.visible = !1, this.Om() } else this.im && (this.im.visible = !1), this.Oo.visible = !0, this.Sm() } addPlayAnim(t, i, n, s = 0) { let e = 0; return this.im && (e = this.im.state.addAnimation(t, i, n, s).animation.duration), e } resetStateSymbol() { this.setDimSymbol(!1), this.bm = !1 } showStaticImageSymbol() { !i.cQ.gameUtils.checkSymbolHaveIdleAnim(this.type) && this.im && this.im.visible && (this.im.visible = !1, this.Oo.visible = !0) } setDimSymbol(t = !0, s = !1) { const e = t ? this.rp : this.hp, r = this.Oo.tint; if (s || r !== e && !this.isBreakInCascade && !this.bm) { if (s) this.im && (this.im.tint = e), this.Oo.tint = e, this.tm && (this._m.tint = e); else { const t = { color: 255 & r }; i.kX.to(n.AppConfig.gameConfig.SlotStyle.SYMBOL_FADED_DIM_TIME, t, { color: 255 & e }, 0, null, (() => { const i = t.color << 16 & 16711680 | t.color << 8 & 65280 | 255 & t.color; this.im && (this.im.tint = i), this.Oo.tint = i, this.tm && (this._m.tint = i) })) } t ? this.Nm() : this.Em() } } dm(t) { n.AppConfig.gameConfig.SymbolType.isOnTop(t) ? i.S9.Set(this.im, i.X2.ReelSymbolsFrontAboveNearWin) : i.S9.Set(this.im, i.X2.ReelSymbolsFront) } Nm() { n.AppConfig.gameConfig.Control.USE_STORE_BLEND_CACHE_DIM_SYMBOL && this.im && this.im.skeleton.slots.forEach(((t, i) => { 0 !== t.blendMode && (this.om.push({ id: i, blendMode: t.blendMode }), t.blendMode = 0) })) } Em() { n.AppConfig.gameConfig.Control.USE_STORE_BLEND_CACHE_DIM_SYMBOL && this.im && (this.om.forEach((t => { this.im.skeleton.slots[t.id].blendMode = t.blendMode })), this.om = []) } setBrokenInCascade(t = !0) { this.isBreakInCascade = !0 } playWinAnim(t = !1) {} playExplodeAnim(t = !1) {} playExplodeDirAnim(t = !1, i = 1) {} playLineWinAnim(t = !1, i = !0) {} playHightlightAnim(t = !1) {} playActiveAnim(t = !1) { return 0 } forceToIdle() {} replayHightlightAnim() { this.playHightlightAnim() } playSwitchAnimation(t, i, n) {} playSymbolDropEffect() { if (n.AppConfig.gameConfig.SlotStyle.CASCADE_HAS_SYMBOL_DROP_EFFECT && !this.pm && this.isInResultShow) { const t = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"); t.visible = !0, this.addChild(t), t.position.set(0, this.lm / 2), i.S9.Set(t, i.X2.ReelSymbolsFrontAboveNearWin); const s = 1e3 * t.state.setAnimation(this.zp, "smoke", !1).animation.duration; i.b2.setTimeout(s, (() => { t.visible = !1, n.SymbolSpinePoolMgr.getInst().returnSymbolSpine("symbol_effect", t) })) } } getGlobalSymbolIndex() {} chooseWild() {} cloneWild(t) {} playTweenWildAnim(t, i, n) {} playFlyingWildAnim(t, i, n) {} playUpgradeAnim(t = !0, i = "") {} IsInUpgrade() { return !1 } respinUpdateSpining(t) {} respinUpdateStopping(t) {} respinUpdateEnd(t) {} playWaitingAnimation(t) { this.um = t, t ? this.Rm() : (this.Oo.rotation = 0, this.Oo.position.set(0, 0), this.im && this.im.position.set(0, 0)) } Rm() { if (this.um) { const t = 200, s = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SHAKE_WAIT_FREQUENCY, e = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SHAKE_WAIT_AMPLITUDE, r = new i.x_(t, s), h = new i.x_(t, s), o = this.Oo.position.clone(), u = { r: 0 }; i.kX.to(t, u, { r: t }, 0, (() => { this.Oo.position.set(0, 0), this.im && this.im.position.set(0, 0), this.am = !this.am, this.Rm() }), (() => { const t = r.getAmplitude(u.r) * e, i = h.getAmplitude(u.r) * e; this.Oo.position.x = t + o.x, this.Oo.position.y = i + o.y, this.im && this.im.position.set(t + o.x, i + o.y) })) } else this.Oo.position.set(0, 0), this.im && this.im.position.set(0, 0) } Sm() { this.nm && (this.nm.visible = !1, i.S9.Reset(this.nm), n.SymbolSpinePoolMgr.getInst().returnSymbolSpine("symbol_effect", this.nm), this.nm = null), this.sm && (this.sm.visible = !1, i.S9.Reset(this.sm), n.SymbolSpinePoolMgr.getInst().returnSymbolSpine("symbol_effect", this.sm), this.sm = null) } Tm(t, i) { return n.ResourceManager.getAtlasFrame("symbol_atlas", "normal" === i ? `sym${t}` : `sym${t}_${i}`) } Mm(t, i, s) { if ("1" !== t && "2" !== t && "3" !== t) return null; { const e = "1" === t ? "silver" : "gold"; if ("normal" === s) return n.ResourceManager.getAtlasFrame("symbol_atlas", `${e}_frame_${i}`); if ("blur" === s) return n.ResourceManager.getAtlasFrame("symbol_atlas", `${e}_frame_${i}_blur`) } } } class qs extends u.W2 { init(t) { this.Pm = t, this.xm = new E.PY(n.ResourceManager.getSpine("near_win_spine")), this.addChild(this.xm), this.xm.state.setAnimation(0, "turbo_charge", !0), this.xm.visible = !1, this.xm.position.set(n.AppConfig.gameConfig.GameBoard.NEAR_WIN_POS_X, -n.AppConfig.gameConfig.GameBoard.NEAR_WIN_POS_Y) } playNearWinAnim(t, s = !1) { const e = t.x; if (!s) { if (e === this.Lm && this.xm.visible) for (let t = 0; t < this.Pm.length; t++) this.Pm[t].setDimAllSymbol(!1), this.Pm[t].setNearWinDimAllSymbol(!1); return void(e === this.Lm && this.xm.visible && i.kX.to(150, this.xm, { alpha: 0 }, 0, (() => { this.xm.visible = !1, n.SoundManagerBase.getInst().stop("SFX_READYHEAD"), n.SoundManagerBase.getInst().stop("SFX_READYHEAD_DRUM_HIT") }))) } if (this.xm.visible && this.Lm === e) return; this.Lm = e; this.xm.position.x = (e - (n.AppConfig.gameConfig.GameBoard.NUMBER_OF_REELS - 1) / 2) * n.AppConfig.gameConfig.GameBoard.SYMBOL_WIDTH, this.xm.visible = !0, this.xm.alpha = 0, i.kX.to(230, this.xm, { alpha: 1 }), n.SoundManagerBase.getInst().playSfx("SFX_READYHEAD"), n.SoundManagerBase.getInst().playSfx("SFX_READYHEAD_DRUM_HIT"), this.Pm[e].setDimAllSymbol(!1), this.Pm[e].setNearWinDimAllSymbol(!1); for (let t = 0; t < this.Pm.length; t++)(t < this.Lm || n.AppConfig.gameConfig.HAS_HORIZONTAL_REEL && t === this.Pm.length - 1) && this.Pm[t].getSymbols().forEach((i => { let s = !0; if (n.AppConfig.gameConfig.GameBoard.BOARD_REAL_SYMBOL_MAPPING) { const e = this.Pm[t].getSymbolIndex(i); s = n.AppConfig.gameConfig.GameBoard.BOARD_REAL_SYMBOL_MAPPING[t][e - 1] || !1 } i.type === n.AppConfig.gameConfig.SymbolType.SymbolScatter && i.isInResultShow && s ? i.playHightlightAnim() : i.setDimSymbol(!0, !1) })), t > this.Lm && (!1 === n.AppConfig.gameConfig.HAS_HORIZONTAL_REEL || t !== this.Pm.length - 1) && this.Pm[t].setNearWinDimAllSymbol() } } var Zs = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })), Js = (t => (t[t.NORMAL = 0] = "NORMAL", t[t.CASCADE = 1] = "CASCADE", t[t.RESPIN = 2] = "RESPIN", t[t.EXPAND = 3] = "EXPAND", t[t.COUNT = 4] = "COUNT", t))(Js || {}), Qs = (t => (t[t.NONE = -1] = "NONE", t[t.NORMAL = 0] = "NORMAL", t[t.TURBO = 1] = "TURBO", t[t.FAST_TO_RESULT = 2] = "FAST_TO_RESULT", t))(Qs || {}); class te extends u.W2 { constructor() { super(...arguments), this.Pm = [], this.Cm = !1, this.Um = !1, this.km = 0, this.Fm = 0, this.Bm = [] } init(t, s) { this.position.set(n.AppConfig.gameConfig.GameBoard.SLOT_MACHINE_POS.x, n.AppConfig.gameConfig.GameBoard.SLOT_MACHINE_POS.y), this.Dm = new u.W2; const e = { width: n.AppConfig.gameConfig.GameBoard.SYMBOL_WIDTH, height: n.AppConfig.gameConfig.GameBoard.SYMBOL_HEIGHT }, r = n.AppConfig.gameConfig.GameBoard.SYMBOL_HORIZONTAL_WIDTH, h = n.AppConfig.gameConfig.GameBoard.NUMBER_OF_REELS, o = n.AppConfig.gameConfig.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL, a = n.AppConfig.gameConfig.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL, l = [], c = []; let f = -e.width * h / 2 + e.width / 2; const v = -e.height * (a + 4) / 2; for (let i = 0; i < h; i++) { const r = t.createReelClass(); r.init(n.AppConfig.gameConfig.GameBoard.GAME_TABLE_FORMAT[i] || a, o, e), this.Dm.addChild(r), this.Pm.push(r), r.x = f; let h = v; n.AppConfig.gameConfig.GameBoard.REEL_POSITION_OFFSET && i < n.AppConfig.gameConfig.GameBoard.REEL_POSITION_OFFSET.length && (r.y = n.AppConfig.gameConfig.GameBoard.REEL_POSITION_OFFSET[i], h += n.AppConfig.gameConfig.GameBoard.REEL_POSITION_OFFSET[i]); for (let e = 0; e < s[i].length; e++) { const o = t.createSymbolClass(); o.init(s[i][e], !1, r.getReelIndex(), r.getSymbolIndex.bind(r)), n.AppConfig.gameConfig.GameBoard.CLIPPING_MASK_TYPE === n.MaskType.REEL ? (o.position.set(0, h + o.megaHeight / 2), r.addSymbol(o, !0)) : (o.position.set(f, h + o.megaHeight / 2), r.addSymbol(o), this.Dm.addChild(o)), o.showSymbolIdleAnim(!0), h += o.megaHeight } r.sortChildren(), r.disableClipping(), f += e.width; const u = t.createSpinControllerClass(); u.init(r, r.getSymbols(), 0, 0), l.push(u); const d = t.createCascadeControllerClass(); d.init(r, r.getSymbols(), 0, 0), c.push(d) } if (n.AppConfig.gameConfig.HAS_HORIZONTAL_REEL) { this.jm = new u.W2, this.jm.name = "boardExtend"; const i = n.AppConfig.gameConfig.GameBoard.HORIZONTAL_REEL_POS.x, h = n.AppConfig.gameConfig.GameBoard.HORIZONTAL_REEL_POS.y, f = !0, v = !0, d = n.AppConfig.gameConfig.GameBoard.HORIZONTAL_NUMBER_SYMBOL_DISPLAYED_ON_REEL || 4, _ = t.createReelClass(); _.init(d, o, e, f, v), this.jm.addChild(_), this.Pm.push(_), _.position.set(i, h); const p = f ? r : e.height; let m = -p * (a + 4) / 2 + p; const b = s.length - 1; for (let i = 0; i < s[b].length; i++) { const n = t.createSymbolClass(), e = s[b][i]; n.position.set(0, m), n.init(e, f, _.getReelIndex()), _.addSymbol(n, !0), n.showSymbolIdleAnim(!0), m += p } _.sortChildren(), _.disableClipping(); const w = t.createSpinControllerClass(); w.init(_, _.getSymbols(), 0, 0, f, v), l.push(w); const g = t.createCascadeControllerClass(); g.init(_, _.getSymbols(), 0, 0, f, v), c.push(g), f && (_.rotation += Math.PI / 2), v || (_.rotation += Math.PI), this.addChild(this.jm) } this.addChild(this.Dm), this.Gm(e, h, a), this.Wm = t.createSpinManagerClass(), this.Wm.init(l), this.Wm.subscribeSpinEndedEvent(this.onSpinEnded.bind(this)), this.Hm = new u.W2, this.Hm.position.set(-n.AppConfig.BASE_SCREEN_WIDTH / 2, -605), this.addChild(this.Hm), this.addChild(i.S9.Get(i.X2.ReelSymbolsFXBottom)), this.addChild(i.S9.Get(i.X2.ReelSymbolsFront)), this.addChild(i.S9.Get(i.X2.ReelSymbolsFXFront)), this.addChild(i.S9.Get(i.X2.ReelSymbolsFront2)), !0 !== n.AppConfig.gameConfig.SlotStyle.DISABLE_NEAR_WIN && (this.Xm = new qs, this.Xm.init(this.Pm), this.addChild(this.Xm), this.regitNearWinHanleFunc(this.Vm.bind(this))), this.addChild(i.S9.Get(i.X2.ReelSymbolsFrontAboveNearWin)), this.$m = t.createWinLogicClass(), this.addChild(this.$m), this.$m.init(this.Pm, this.Dm), this.addChild(i.S9.Get(i.X2.ReelSymbolsFXTop)), this.addChild(i.S9.Get(i.X2.ReelSymbolsTop)), this.Ym = t.createSpinManagerClass(), this.Ym.init(c), this.Ym.subscribeSpinEndedEvent(this.onSpinEnded.bind(this)) } getContainerDeco() { return this.Hm } getReelList() { return this.Pm } getSlotMachineGlobalPos() { return this.getGlobalPosition() } getSymbolGlobalPos(t, i) { return this.Pm[t].getSymbol(i).getGlobalPosition() } useCacheAsBitmap(t) { this.cacheAsBitmap = t, this.Pm.forEach((i => { i.setSymbolKeletonAutoUpdate(!t) })) } update(t) { this.Wm && this.Wm.update(t), this.Ym && this.Ym.update(t), this.Pm.forEach((i => { i.update(t) })) } onPause() { this.Pm.forEach((t => { t.onPause() })), this.$m.onPause() } onResume() { this.Pm.forEach((t => { t.onResume() })), this.$m.onResume() } zm(t, i = 0, n = !0) { this.enableBoardClipping(), this.km = t, this.Fm = i, 0 === i ? this.Wm.startSpin(t, i, n) : 1 === i && this.Ym.startSpin(t, i, n) } forceStopMode(t) { this.Wm.forceStopMode(t) } stopForcingStopMode() { this.Wm.stopForcingStopMode() } startSpin(t) { this.zm(t, 0) } startNormalSpin(t) { this.zm(t, 0) } startCascadeSpin(t = 0) { this.Um || 2 === t ? t = 2 : this.Cm && (t = 1), this.zm(t, 1, !1) } stopSpin(t) { this.Wm.stopSpin(t) } forceStop() { this.km = 2, this.Wm.forceStop() } setFTRMode(t) { this.Um = t, this.km = t ? 2 : 0 } setTurboMode(t) { this.Cm = t, this.km = t ? 1 : 0 } getSpinMode() { return this.km } setSpinMode(t) { this.km = t, this.Ym.setSpinMode(t), this.Wm.setSpinMode(t) } onSpinDataReceived(t) { 0 === this.Fm ? this.Wm.onSpinDataReceived(t) : 1 === this.Fm && this.Ym.onSpinDataReceived(t) } onSpinEnded(t) { this.disableBoardClipping(), this.Bm.forEach((i => { i(t) })) } Gm(t, i, s) { const e = n.AppConfig.gameConfig.GameBoard.BOARD_CLIPPING_CUT_TOP || 0, r = n.AppConfig.gameConfig.GameBoard.BOARD_CLIPPING_CUT_BOTTOM || 0, h = t.height / 2, o = n.AppConfig.gameConfig.GameBoard.SYMBOL_HORIZONTAL_WIDTH, u = n.AppConfig.gameConfig.GameBoard.SYMBOL_HORIZONTAL_HEIGHT; if (n.AppConfig.gameConfig.GameBoard.CLIPPING_MASK_TYPE === n.MaskType.BOARD) { this.Km = new v.TC, this.Km.name = "boardClippingMask", this.Km.y = this.Km.y + n.AppConfig.gameConfig.GameBoard.BOARD_CLIPPING_OFFSET_Y; const o = t.height * s, u = t.width * i; this.Km.clear(), this.Km.beginFill(9160191, .8), this.Km.drawRect(-u / 2, -o + h - 5 + e, u, t.height * s + 5 - e - r), this.Km.endFill(), this.Dm.addChild(this.Km), this.Dm.mask = this.Km } if (n.AppConfig.gameConfig.HAS_HORIZONTAL_REEL) { const i = new v.TC; i.name = "boardExtendClippingMask", i.clear(), i.beginFill(9160191, .8), i.drawRect(2 * -o - n.AppConfig.gameConfig.GameBoard.HORIZONTAL_CLIPPING_X, 4 * -u - h - n.AppConfig.gameConfig.GameBoard.HORIZONTAL_CLIPPING_Y, 4 * o + n.AppConfig.gameConfig.GameBoard.HORIZONTAL_CLIPPING_WIDTH, t.height + n.AppConfig.gameConfig.GameBoard.HORIZONTAL_CLIPPING_HEIGHT), i.endFill(), this.jm.addChild(i), this.jm.mask = i } this.disableBoardClipping() } disableBoardClipping() { n.AppConfig.gameConfig.GameBoard.ALWAYS_ENABLE_CLIPPING || n.AppConfig.gameConfig.GameBoard.CLIPPING_MASK_TYPE !== n.MaskType.BOARD || (this.Dm.mask = void 0, this.Km.renderable = !1) } enableBoardClipping() { n.AppConfig.gameConfig.GameBoard.ALWAYS_ENABLE_CLIPPING || n.AppConfig.gameConfig.GameBoard.CLIPPING_MASK_TYPE !== n.MaskType.BOARD || (this.Dm.mask = this.Km, this.Km.renderable = !0) } runWinValidation(t, i, n, s = 1) { return Zs(this, null, (function*() { return this.$m.runWinValidation(t, i, n, this.km, s) })) } playLoopCombineAnimation(t, i) { this.$m.playLoopCombineAnimation(t, i) } skipWinCombineShow() { this.$m.skipWinCombineShow() } subscribeSpinEndedEvent(t) { this.Bm.push(t) } Vm(t, i) { this.Xm.playNearWinAnim(t, i) } regitNearWinHanleFunc(t) { this.Wm.regitNearWinHanleFunc(t) } subscribeReelStopEvent(t) { this.Wm.subscribeReelStopEvent(t), this.Ym.subscribeReelStopEvent(t) } playSpecialSymbolActivation(t) { return Zs(this, null, (function*() { return new Promise((n => { let s = 0; this.Pm.forEach((i => { for (let n = 0; n < i.getSymbols().length; n++) i.getSymbol(n).type === t && i.getSymbol(n).isInResultShow && (s = i.getSymbol(n).playActiveAnim()) })), i.b2.setTimeout(s, (() => { n() })) })) })) } playHighlightScatter() { this.Pm.forEach((t => { for (let i = 0; i < t.getSymbols().length; i++) t.getSymbol(i).type === n.AppConfig.gameConfig.SymbolType.SymbolScatter && t.getSymbol(i).isInResultShow && t.getSymbol(i).replayHightlightAnim() })) } forceIdleScatter() { this.Pm.forEach((t => { for (let i = 0; i < t.getSymbols().length; i++) t.getSymbol(i).type === n.AppConfig.gameConfig.SymbolType.SymbolScatter && t.getSymbol(i).isInResultShow && t.getSymbol(i).forceToIdle() })) } chooseWild(t) { this.Pm.forEach((i => Zs(this, null, (function*() { for (let s = 1; s < i.getSymbols().length - 1; s++) i.getSymbol(s).type == n.AppConfig.gameConfig.SymbolType.SymbolWild && i.getSymbol(s).getGlobalSymbolIndex() == t && i.getSymbol(s).chooseWild() })))) } cloneWild(t, i) { this.Pm.forEach((s => Zs(this, null, (function*() { for (let e = 1; e < s.getSymbols().length - 1; e++) s.getSymbol(e).type == n.AppConfig.gameConfig.SymbolType.SymbolWild && s.getSymbol(e).getGlobalSymbolIndex() == t && s.getSymbol(e).cloneWild(i) })))) } playTweenWild(t, i, n, s) { this.Pm.forEach((e => Zs(this, null, (function*() { for (let r = 1; r < e.getSymbols().length - 1; r++) e.getSymbol(r).getGlobalSymbolIndex() == t && e.getSymbol(r).playTweenWildAnim(i, n, s) })))) } playFlyMulAnim(t) { let s = 0; this.Pm.forEach((e => { for (let r = 0; r < e.getSymbols().length; r++) e.getSymbol(r).type === n.AppConfig.gameConfig.SymbolType.SymbolWild && e.getSymbol(r).isInResultShow && (i.b2.setTimeout(s, (() => { e.getSymbol(r).chooseWild() })), s += t) })) } enableBlurSpinningAtReelIndex(t, i) { this.Wm.enableBlurSpinningAtReelIndex(t, i) } forceSetNormalSpinTime(t) { this.Wm.forceSetNormalSpinTime(t) } resetNormalSpinTime() { this.Wm.resetNormalSpinTime() } } var ie = (t => (t[t.IDLE = 0] = "IDLE", t[t.ON_STACK = 1] = "ON_STACK", t[t.SPINNING = 2] = "SPINNING", t[t.FEATURING = 3] = "FEATURING", t[t.STOPPING = 4] = "STOPPING", t[t.WAITING = 5] = "WAITING", t[t.NEAR_WIN = 6] = "NEAR_WIN", t[t.NEAR_WIN_END = 7] = "NEAR_WIN_END", t[t.END_SPIN = 8] = "END_SPIN", t[t.EASING_END = 9] = "EASING_END", t[t.TURBO_END_SPIN = 10] = "TURBO_END_SPIN", t))(ie || {}); class ne { constructor() { this.Wp = 0, this.qm = 0, this.Zm = 0, this.Jm = 0, this.Qm = null, this.tb = null, this.ib = [], this.nb = [], this.sb = 0, this.eb = 0, this.rb = 0, this.hb = 0, this.ob = 0, this.ub = 0, this.ab = 0, this.Cm = !1, this.lb = !1, this.Fp = !1, this.vb = !1, this._b = !0, this.pb = 0 } get enableBlurSpinning() { return this._b } set enableBlurSpinning(t) { this._b = t } init(t, i, s, e, r = !1, h = !1) { this.mb = t, this.lb = r, this.Fp = h, this.Wp = t.getReelIndex(), this.kp = i, this.qm = s, this.Zm = e, this.jp = r ? n.AppConfig.gameConfig.GameBoard.SYMBOL_HORIZONTAL_WIDTH : n.AppConfig.gameConfig.GameBoard.SYMBOL_HEIGHT, this.eb = 0, this.pb = -this.jp * (this.mb.getNumberShowRow() + 4) / 2 + .5 * this.jp, r || (this.pb += this.mb.y) } startSpin(t = Qs.NORMAL, i = Js.NORMAL) {} stopSpin(t, i, n, s) {} forceShowResult(t) { this.vb = !1; let i = this.pb; for (let s = 0; s < n.AppConfig.gameConfig.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; s++) { const e = t[s]; this.kp[s].showBlur(!1), this.kp[s].resetSymbol(e), this.kp[s].isInResultShow = 0 !== s && e !== n.AppConfig.gameConfig.SymbolType.SymbolNull, i += 0 === s ? this.jp / 2 - this.kp[s].megaHeight / 2 : this.kp[s].megaHeight / 2, this.kp[s].y = i, i += this.kp[s].megaHeight / 2 } this.ab = 0, this.sb = 0, this.nb = [...t], this.onReelStop(Qs.FAST_TO_RESULT); let s = -1 !== n.AppConfig.gameConfig.Sound.SCATTER_SOUND_DELAY, e = -1 !== n.AppConfig.gameConfig.Sound.WILD_SOUND_DELAY; for (let i = 0; i < t.length; i++) { const r = n.AppConfig.gameConfig.BE_RESPONSE_FORMAT === n.ResponseFormat.MEGA_SYMBOL ? t[i].split("_")[0] : t[i]; r === n.AppConfig.gameConfig.SymbolType.SymbolScatter && s && (n.SoundManagerBase.getInst().playSfx("SFX_SYMBOL_SCATTER"), s = !1), r === n.AppConfig.gameConfig.SymbolType.SymbolWild && e && (n.SoundManagerBase.getInst().playSfx("SFX_SYMBOL_WILD"), e = !1) } } forceFixResultShow(t) { this.vb = !1; let i = this.pb; for (let s = 0; s < n.AppConfig.gameConfig.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; s++) { const e = t[s]; this.kp[s].showBlur(!1), this.kp[s].resetSymbol(e), this.kp[s].isInResultShow = 0 !== s && e !== n.AppConfig.gameConfig.SymbolType.SymbolNull, i += 0 === s ? this.jp / 2 - this.kp[s].megaHeight / 2 : this.kp[s].megaHeight / 2, this.kp[s].y = i, i += this.kp[s].megaHeight / 2 } this.ab = 0, this.sb = 0, this.nb = [...t] } startUpgradeSymbol(t) { this.Rm(!1); let s = 0; const e = performance.now() - this.ub; return this.mb.getSymbols().forEach((t => { t.IsInUpgrade() && e < n.AppConfig.gameConfig.SlotStyle.SYMBOL_RESPIN_UPGRADE_TIME && (s = n.AppConfig.gameConfig.SlotStyle.SYMBOL_RESPIN_UPGRADE_TIME - e) })), new Promise((e => { this.ab = 3, i.b2.setTimeout(s, (() => { let s = 0; for (let t = this.kp.length - 1; t >= 0; t--) if (this.kp[t].isInResultShow) { s = t; break } for (let i = t.length - 1; i >= 0; i--) 0 === s && t[i] === n.AppConfig.gameConfig.SymbolType.SymbolNull || (s <= 0 ? s-- : t[i] !== n.AppConfig.gameConfig.SymbolType.SymbolNull && (this.mb.getSymbols()[s].IsInUpgrade() && (this.mb.getSymbols()[s].playUpgradeAnim(!1, t[i]), n.SoundManagerBase.getInst().stop("SFX_SYMBOL_RANDOM"), n.SoundManagerBase.getInst().isPlaying("SFX_SYMBOL_RANDOM_STOP") || n.SoundManagerBase.getInst().playSfx("SFX_SYMBOL_RANDOM_STOP")), s--)); i.b2.setTimeout(n.AppConfig.gameConfig.SlotStyle.SYMBOL_RESPIN_TRANSFORM_TIME, e) })) })) } Rm(t) { this.mb.getSymbols().forEach((i => { i.playWaitingAnimation(t) })) } update(t) {} showSymbolBlur(t) { this.kp.forEach((t => { t.resetSymbol(t.type) })), this.vb = t } isSymbolBlur() { return this.vb } isSpinning() { return 0 !== this.ab && 5 !== this.ab } getCurrentSpinState() { return this.ab } isHorizontal() { return this.lb } startReelSpin(t = 0, s = Qs.NORMAL, e = Js.NORMAL) { s === Qs.TURBO && (t = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TIME_DELAY), i.b2.clearTimeout(this.bb), i.b2.clearTimeout(this.wb), this.wb = i.b2.setTimeout(t, this.startSpin.bind(this, s, e)), this.ab = 1, this.km = s, this.Fm = e, this.eb = 0, this.hb = 0 } isStop() { return 0 === this.sb && 0 === this.ab } onReelStop(t = Qs.NORMAL) { this.mb.getSymbols().forEach((t => { t.showSymbolIdleAnim(!0) })), this.mb.disableClipping(), this.Qm && this.Qm(this.Wp, t) } registerStopCaller(t) { this.Qm = t } onReelStart(t = Qs.NORMAL, i = Js.NORMAL) { this.mb.enableClipping(), this.tb && this.tb(this.Wp, t, i) } registerStartCaller(t) { this.tb = t } stopReelAt(t, s = 0) { this.Cm && (s = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TIME_TURBO), i.b2.clearTimeout(this.bb), i.b2.clearTimeout(this.wb), this.bb = i.b2.setTimeout(s, this.stopReel.bind(this, t)) } stopReelAtNearWin(t, s = 0) { this.Cm && (s = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TIME_TURBO_NEAR_WIN), i.b2.clearTimeout(this.bb), i.b2.clearTimeout(this.wb), this.bb = i.b2.setTimeout(s, this.stopReelNearWin.bind(this, t)) } stopReel(t, s) { if (0 !== this.ab) { if (6 === this.ab) return; this.ib = [], this.ab = 4, this.ob = 0, this.ib = [...t], this.nb = [...t]; let s = !0, e = !0; for (let r = 0; r < t.length; r++) { const h = n.AppConfig.gameConfig.BE_RESPONSE_FORMAT === n.ResponseFormat.MEGA_SYMBOL ? t[r].split("_")[0] : t[r]; h === n.AppConfig.gameConfig.SymbolType.SymbolScatter && s && (i.b2.setTimeout(n.AppConfig.gameConfig.Sound.SCATTER_SOUND_DELAY, (() => { n.SoundManagerBase.getInst().playSfx("SFX_SYMBOL_SCATTER") })), s = !1), h === n.AppConfig.gameConfig.SymbolType.SymbolWild && e && (i.b2.setTimeout(n.AppConfig.gameConfig.Sound.WILD_SOUND_DELAY, (() => { n.SoundManagerBase.getInst().playSfx("SFX_SYMBOL_WILD") })), e = !1) }!1 === n.AppConfig.gameConfig.SlotStyle.PLAY_REEL_STOP_SFX_ONCE && i.b2.setTimeout(300, (() => { n.SoundManagerBase.getInst().playSfx("SFX_REEL_STOP") })) } } stopReelNearWin(t) { i.b2.clearTimeout(this.bb), 0 !== this.ab && (this.rb = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TIME_NEAR_WIN_START, this.ab = 6, this.hb = 0, this.vb && this.showSymbolBlur(!1), this.ib = t.slice(0, n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_NEAR_WIN_LENGHT), this.nb = [...t]) } checkErrorDisplay() { let t = !1; const i = [], s = []; for (let t = 0; t < n.AppConfig.gameConfig.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; t++) i.push(this.kp[t].type), n.AppConfig.gameConfig.BE_RESPONSE_FORMAT === n.ResponseFormat.MEGA_SYMBOL && n.AppConfig.gameConfig.HAS_HORIZONTAL_REEL && s.push(this.kp[t].megaSymbol.r); for (let i = 0; i < this.nb.length; i++) { const s = this.nb[i].split("_"); s[0] !== n.AppConfig.gameConfig.SymbolType.SymbolNull && (this.kp[i].type !== s[0] || n.AppConfig.gameConfig.BE_RESPONSE_FORMAT === n.ResponseFormat.MEGA_SYMBOL && s[1] !== this.kp[i].megaSymbol.r) && (this.kp[i].resetSymbol(this.nb[i]), t = !0) } return t && this.forceFixResultShow(this.nb), t } gb(t) { switch (n.AppConfig.gameConfig.SlotStyle.BOUNCE_LEVEL_NORMAL) { case 3: return i.oY.Bounce.SymbolOut3(t); case 2: return i.oY.Bounce.SymbolOut2(t); case 1: return i.oY.Bounce.SymbolOut1(t); case 0: return i.oY.Bounce.SymbolOutDefault(t); default: return i.oY.Quadratic.In(t) } } yb(t) { switch (n.AppConfig.gameConfig.SlotStyle.BOUNCE_LEVEL_RESPIN) { case 3: return i.oY.Bounce.SymbolOut3(t); case 2: return i.oY.Bounce.SymbolOut2(t); case 1: return i.oY.Bounce.SymbolOut1(t); case 0: return i.oY.Bounce.SymbolOutDefault(t); default: return i.oY.Quadratic.In(t) } } } class se extends ne { constructor() { super(...arguments), this.Eb = .25, this.Ab = !1, this.Tb = 0 } startReelSpin(t = 0, s = Qs.NORMAL) { for (let t = 0; t < this.kp.length; t++) if (!this.kp[t].renderable) { const i = this.kp.splice(t, 1).pop(), s = this.kp[0]; i.renderable = !0, i.position.set(s.x, s.y - n.AppConfig.gameConfig.GameBoard.SYMBOL_HEIGHT), this.kp.unshift(i) } this.ub = performance.now(), this.wb = i.b2.setTimeout(t, this.startSpin.bind(this)), this.ab = ie.ON_STACK, super.onReelStart(s) } startSpin() { this.Tb = 0, this.ab = ie.SPINNING } stopSpin(t, i, n, s = !1) { this.Ab = !1, this.ab = ie.STOPPING, this.mb.getSymbols().forEach((t => { t.playWaitingAnimation(!1), t.showBlur(!1) })), s || this.stopReel(t, i) } update(t) { this.ab === ie.IDLE || (this.ab === ie.SPINNING ? this.Ab || (this.Tb += t, this.Tb > this.Eb && (this.Ab = !0, this.mb.getSymbols().forEach((t => { t.playWaitingAnimation(!0) })))) : this.ab === ie.STOPPING || this.ab === ie.END_SPIN && (this.Ab = !1, this.mb.getSymbols().forEach((t => { t.playWaitingAnimation(!1) })), this.ab = ie.IDLE, this.onReelStop(this.km))) } getCurrentSpinState() { return this.ab } onReelStop(t) { this.checkErrorDisplay(), super.onReelStop(t) } stopReel(t, s) { this.ab = ie.STOPPING, this.ob = 0, this.nb = [...t]; let e = 0; for (let t = this.kp.length - 1; t >= 0; t--) if (this.kp[t].isInResultShow) { e = t; break } let r = this.pb; for (let i = t.length - 1; i >= 0; i--) if (0 !== e || t[i] !== n.AppConfig.gameConfig.SymbolType.SymbolNull) if (e <= 0) { const s = this.kp[0]; if (s.resetSymbol(t[i]), r -= 0 === e ? this.jp / 2 - s.megaHeight / 2 : s.megaHeight / 2, s.position.y = r, s.isInResultShow = 0 !== i && t[i] !== n.AppConfig.gameConfig.SymbolType.SymbolNull, r -= this.kp[0].megaHeight / 2, 0 !== i) { const t = this.kp.pop(); this.kp.unshift(t) } e-- } else t[i] !== n.AppConfig.gameConfig.SymbolType.SymbolNull && e--; r = this.pb; const h = []; for (let t = 0; t < this.kp.length; t++) { r += 0 === t ? this.jp / 2 - this.kp[t].megaHeight / 2 : this.kp[t].megaHeight / 2; const i = this.kp[t].position.y, n = r - i; r += this.kp[t].megaHeight / 2; h.push(i + n) } const o = Math.random() * n.AppConfig.gameConfig.SlotStyle.CASCADE_RANDOM_DELAY_BETWEEN_REEL, u = n.AppConfig.gameConfig.SlotStyle.SYMBOL_DROPPING_TIME_CASCADE; let a = 0; const l = n.AppConfig.gameConfig.SlotStyle.SYMBOL_RESPIN_BOUND_TIME, c = n.AppConfig.gameConfig.SlotStyle.REEL_CASCADE_DELAY_TIME, f = this.Wp; for (let t = this.kp.length - 1; t >= 0; t--) { const n = h[t] - this.kp[t].position.y; if (Math.abs(n) > 1) { if (Math.abs(n) > this.jp) { a += 33 * Math.min(3, Math.random() * n / this.jp) } i.b2.setTimeout(o + a + c[f], (() => { i.kX.easeTo(u, this.kp[t].position, { y: h[t] - 48 }, 0, (() => { i.kX.easeTo(l, this.kp[t].position, { y: h[t] }, 0, (() => { this.kp[t].playSymbolDropEffect() }), null, this.yb) }), null, i.oY.Sinusoidal.In) })) } } i.b2.setTimeout(o + a + u + l + 33, (() => { this.ab = ie.END_SPIN })) } } class ee { constructor() { this.Mb = [], this.Ob = Js.NORMAL, this.Ib = null, this.Nb = !1, this.Rb = Qs.NONE, this.km = Qs.NORMAL, this.Vm = null, this.Pb = -1, this.xb = 0, this.Lb = !1, this.Cb = void 0, this.Bm = [], this.Ub = [], this.kb = -1 } init(t) { this.Mb = t, this.Mb.forEach((t => { t.registerStopCaller(this.Fb.bind(this)), t.registerStartCaller(this.Bb.bind(this)) })) } update(t) { if ((this.Rb === Qs.FAST_TO_RESULT || this.Rb === Qs.TURBO && n.AppConfig.gameConfig.SlotStyle.USE_FORCE_RESULT_TURBO) && this.Nb) { const t = !this.Mb.every((t => t.isSpinning())), i = this.Mb.every((t => t.isSymbolBlur())); (i || t || i && this.Rb === Qs.TURBO) && this.forceShowResultFTR() } this.Mb.forEach((i => { i.update(t) })) } forceStopMode(t) { this.Cb = t } stopForcingStopMode() { this.Cb = void 0 } startSpin(t, s, e = !0) { this.Pb = -1; const r = this.Db(s); if (this.Mb.forEach(((i, n) => { i.startReelSpin(r[n], t, s) })), this.Rb = Qs.NONE, this.Ob = s, this.Nb = !1, this.km = t, e) { const n = this.jb(s, t); this.Gb = i.b2.setTimeout(n, (() => { this.stopSpin(void 0 !== this.Cb ? this.Cb : this.km) })) } this.Ob !== Js.CASCADE && n.SoundManagerBase.getInst().playSfx("SFX_REEL_ROLLING") } stopSpin(t) { return s = this, e = null, r = function*() { var s; if (n.GameSceneBase.gameScene.updateTnumValue(), !this.Nb || t === Qs.TURBO) return void(this.Rb = t); let e = []; e = n.AppConfig.gameConfig.BE_RESPONSE_FORMAT === n.ResponseFormat.MEGA_SYMBOL ? i.cQ.gameUtils.getMegaMatrix(this.Ib.megaSymbol, this.Ib.megaHSymbol, n.AppConfig.gameConfig.GameBoard.GAME_TABLE_FORMAT) : i.cQ.gameUtils.getLineMatrix(this.Ib.symbol, n.AppConfig.gameConfig.GameBoard.GAME_TABLE_FORMAT); const r = i.cQ.gameUtils.checkReelNearWinActive(e), h = this.Ob === Js.NORMAL && r.length > 0; if (h && t === Qs.NORMAL && i.b2.setTimeout(200, (() => { n.GameSceneBase.gameScene.showHintNearWin() })), this.Ob === Js.CASCADE) { yield this.startGameFeature(e); const t = null == (s = this.Ib.featureResults) ? void 0 : s.maxWays; n.GameSceneBase.gameScene.updateMaxWay(t), i.b2.setTimeout(300, (() => { n.SoundManagerBase.getInst().playSfx("SFX_REEL_DROP") })) } else i.b2.setTimeout(300, (() => { n.SoundManagerBase.getInst().stop("SFX_REEL_ROLLING"), h || !0 !== n.AppConfig.gameConfig.SlotStyle.PLAY_REEL_STOP_SFX_ONCE || n.SoundManagerBase.getInst().playSfx("SFX_REEL_STOP") })); this.Rb = Qs.NONE; let o = this.Mb.length; if (n.AppConfig.gameConfig.HAS_HORIZONTAL_REEL) { const i = this.Mb.length - 1; if (this.Mb[i].isSpinning()) { const s = this.Mb[i].isHorizontal() ? 0 : n.AppConfig.gameConfig.SlotStyle.REELS_STOP_TIMING[n.AppConfig.gameConfig.SlotStyle.REELS_STOP_TIMING.length - 1]; this.Mb[i].stopSpin(e[i], t, s, !1) } o = this.Mb.length - 1 } for (let i = 0; i < o; i++) if (this.Mb[i].isSpinning()) { const s = this.Mb[i].isHorizontal() ? 0 : n.AppConfig.gameConfig.SlotStyle.REELS_STOP_TIMING[i], o = r.indexOf(i) >= 0, u = h && o && n.AppConfig.gameConfig.SlotStyle.REEL_NEAR_WIN_CAN_ACTIVE.indexOf(i) >= 0; if (this.Mb[i].stopSpin(e[i], t, s, u), u) { this.Pb = i; break } } }, new Promise(((t, i) => { var n = t => { try { o(r.next(t)) } catch (t) { i(t) } }, h = t => { try { o(r.throw(t)) } catch (t) { i(t) } }, o = i => i.done ? t(i.value) : Promise.resolve(i.value).then(n, h); o((r = r.apply(s, e)).next()) })); var s, e, r } forceStop() { i.b2.clearTimeout(this.Gb), this.Rb = void 0 !== this.Cb ? this.Cb : Qs.FAST_TO_RESULT } forceShowResultFTR() { n.SoundManagerBase.getInst().stop("SFX_REEL_ROLLING"), n.GameSceneBase.gameScene.updateTnumValue(), this.Rb = Qs.NONE; let t = []; t = n.AppConfig.gameConfig.BE_RESPONSE_FORMAT === n.ResponseFormat.MEGA_SYMBOL ? i.cQ.gameUtils.getMegaMatrix(this.Ib.megaSymbol, this.Ib.megaHSymbol, n.AppConfig.gameConfig.GameBoard.GAME_TABLE_FORMAT) : i.cQ.gameUtils.getLineMatrix(this.Ib.symbol, n.AppConfig.gameConfig.GameBoard.GAME_TABLE_FORMAT); let s = !1; this.Mb.forEach(((i, n) => { i.isSpinning() && (i.forceShowResult(t[n]), s = !0) })), s && n.SoundManagerBase.getInst().playSfx("SFX_REEL_DROP") } startGameFeature(t) { const i = this.Mb.map((function(i, n) { return i.startUpgradeSymbol(t[n]) })); return Promise.all(i) } onSpinDataReceived(t) { this.Nb = !0, this.Ib = t, (this.Rb === Qs.TURBO && !n.AppConfig.gameConfig.SlotStyle.USE_FORCE_RESULT_TURBO || this.Rb === Qs.NORMAL || this.Ob === Js.CASCADE) && this.stopSpin(this.Rb) } onSpinEnded() { let t = []; n.AppConfig.gameConfig.BE_RESPONSE_FORMAT === n.ResponseFormat.MEGA_SYMBOL ? t = i.cQ.gameUtils.getMegaMatrix(this.Ib.megaSymbol, this.Ib.megaHSymbol, n.AppConfig.gameConfig.GameBoard.GAME_TABLE_FORMAT) : n.AppConfig.gameConfig.SLOT_TYPE === n.SlotType.LINE_GAME && (t = i.cQ.gameUtils.getLineMatrix(this.Ib.symbol, n.AppConfig.gameConfig.GameBoard.GAME_TABLE_FORMAT)), this.Bm.forEach((i => { i(t) })) } Fb(t, i) { var s; let e = !1; if (this.Mb.every((t => t.isStop()))) { if (this.onSpinEnded(), this.Ob === Js.NORMAL) { const t = null == (s = this.Ib.featureResults) ? void 0 : s.maxWays; n.GameSceneBase.gameScene.updateMaxWay(t, !0) } } else this.Pb === t && (this.Pb = -1, this.stopSpin(this.Rb)); if (this.Pb === (6 === t ? 0 : t + 1) && this.Pb >= 0 && i !== Qs.FAST_TO_RESULT) { e = !0; const t = new r.E9(this.Pb, this.xb); this.Vm(t, !0) } if (this.Vm && !e) { const i = new r.E9(t, this.xb); this.Vm(i, !1), this.Lb = !1 } this.Ub.forEach((i => { i(t) })) } Bb(t, i) {} subscribeSpinEndedEvent(t) { this.Bm.push(t) } regitNearWinHanleFunc(t) { this.Vm = t } subscribeReelStopEvent(t) { this.Ub.push(t) } forceSetNormalSpinTime(t) { this.kb = t } resetNormalSpinTime() { this.kb = -1 } jb(t, i) { return t === Js.CASCADE ? n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TIME_CASCADE : this.kb > -1 ? this.kb : i === Qs.TURBO ? n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TIME_TURBO : n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TIME_NORMAL } Db(t) { return t === Js.CASCADE ? n.AppConfig.gameConfig.SlotStyle.CASCADE_SPIN_DELAYS : n.AppConfig.gameConfig.SlotStyle.REEL_SPIN_DELAYS } setSpinMode(t) { this.km = t } getSpinMode() { return this.km } enableBlurSpinningAtReelIndex(t, i) { this.Mb[t].enableBlurSpinning = i } } class re extends ne { constructor() { super(...arguments), this.Wb = t => { const i = 7.5625, n = 2.75; return t < 1 / n ? 1 : t < 2 / n ? i * (t -= 1.5 / n) * t + .75 : t < 2.5 / n ? i * (t -= 2.25 / n) * t + .9375 : i * (t -= 2.625 / n) * t + .984375 } } startSpin(t = Qs.NORMAL) { this.ab = ie.SPINNING, this.sb = 0, t === Qs.TURBO && (this.sb = 0), this.mb.getSymbols().forEach((t => { t.showSymbolIdleAnim(!1) })), super.onReelStart(t) } stopSpin(t, i, n, s) { this.Cm = i === Qs.TURBO, s ? this.stopReelAtNearWin(t, n) : this.stopReelAt(t, n) } update(t) { this.Fm === Js.RESPIN ? this.Hb(t) : this.Xb(t) } Hb(t) { this.ab === ie.IDLE || (this.ab === ie.SPINNING ? this.kp.forEach((i => { i.respinUpdateSpining(t) })) : this.ab === ie.STOPPING ? this.kp.forEach((i => { i.respinUpdateStopping(t) })) : this.ab === ie.END_SPIN && this.kp.forEach((i => { i.respinUpdateEnd(t) }))) } Xb(t) { const s = 1e3 * t; if (this.ab === ie.IDLE); else { if (this.ab === ie.SPINNING) if (this.hb += s, this.Cm) if (n.AppConfig.gameConfig.SlotStyle.SPIN_EASING_BACK_START_TURBO) { const i = this.Vb(this.hb); this.sb = Math.min(n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TURBO_SPEED, i) * t } else this.sb = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TURBO_SPEED * t; else if (n.AppConfig.gameConfig.SlotStyle.SPIN_EASING_BACK_START_NORMAL) { const i = this.Vb(this.hb); this.sb = Math.min(n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_MAX_SPEED, i) * t } else { this.eb += n.AppConfig.gameConfig.SlotStyle.SPIN_ACCELERATION_NORMAL; this.sb = Math.min(n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_MAX_SPEED * t, this.sb + this.eb * t) } else if (this.ab === ie.NEAR_WIN || this.ab === ie.NEAR_WIN_END) { if (this.rb > 0) this.rb -= s, this.sb = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_MAX_SPEED * t; else { const i = this.$b(s), e = t * (n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_NEAR_WIN_SPEED + this.ib.length * n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_NEAR_WIN_SPEED / n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_NEAR_WIN_LENGHT); let r = Math.max(i, n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_NEAR_WIN_SPEED) * t; r <= e && (r = e, this.ab = ie.NEAR_WIN_END), this.sb = r } if (this.ib.length > 0); else if (0 === this.ib.length) if (this.Jm > 0) { const i = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_NEAR_WIN_SPEED * t; this.Jm < i ? this.Jm > 4 ? this.sb = this.Jm / 2 : (this.Yb(this.Jm), this.Jm = 0, this.sb = 0) : this.sb = i, this.sb > this.jp && (this.sb = this.jp - 25), this.Jm -= this.sb } else this.sb = 0 } else if (this.ab === ie.STOPPING) this.vb || this.showSymbolBlur(!0), this.ib.length > 0 && (this.sb = this.Cm ? n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TURBO_SPEED * t : n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_MIN_SPEED * t); else if (this.ab === ie.END_SPIN) if (n.AppConfig.gameConfig.SlotStyle.USE_EASING_STOP_SPIN) { let t = this.pb; for (let s = 0; s < this.kp.length; s++) { t += 0 === s ? this.jp / 2 - this.kp[s].megaHeight / 2 : this.kp[s].megaHeight / 2; const e = this.kp[s].position.y, r = t - e; t += this.kp[s].megaHeight / 2; const h = n.AppConfig.gameConfig.SlotStyle.TIME_EASING_STOPPING; if (Math.abs(r) > 1) { i.kX.easeTo(h, this.kp[s].position, { y: e + r }, 0, null, null, this.Wb) } else this.kp[s].position.y = e + r; i.b2.setTimeout(h, (() => { this.ab = ie.EASING_END })), Math.abs(r) <= 1 && (this.ab = ie.EASING_END), r < -1 && (this.ab = ie.EASING_END) } this.ab = ie.WAITING, this.sb = 0, n.AppConfig.gameConfig.SlotStyle.NO_WAIT_TIME_EASING_STOPPING && this.mb.getSymbols().forEach((t => { t.showSymbolIdleAnim(!0) })) } else if (n.AppConfig.gameConfig.SlotStyle.USE_BACK_EASING_STOP_SPIN) { const t = this.pb + this.jp / 2 + this.kp[1].megaHeight / 2 - this.kp[1].position.y; if (t > 0) { const i = Math.min(this.sb, t); this.sb = i } else { const t = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_BOUND, s = n.AppConfig.gameConfig.SlotStyle.TIME_EASING_STOPPING; let e = this.pb; for (let n = 0; n < this.kp.length; n++) { e += 0 === n ? this.jp / 2 - this.kp[n].megaHeight / 2 : this.kp[n].megaHeight / 2; const r = e; this.kp[n].position.y = e + t, e += this.kp[n].megaHeight / 2; i.kX.easeTo(s, this.kp[n].position, { y: r }, 0, null, null, this.zb) } i.b2.setTimeout(s, (() => { this.ab = ie.EASING_END })), this.ab = ie.WAITING, this.sb = 0, n.AppConfig.gameConfig.SlotStyle.NO_WAIT_TIME_EASING_STOPPING && this.mb.getSymbols().forEach((t => { t.showSymbolIdleAnim(!0) })) } } else if (n.AppConfig.gameConfig.SlotStyle.USE_BOUNCE_EASING_STOP_SPIN) { const t = this.pb + this.jp / 2 + this.kp[1].megaHeight / 2 - this.kp[1].position.y; if (t > 0) { const i = Math.min(this.sb, t); this.sb = i } else { const t = n.AppConfig.gameConfig.SlotStyle.TIME_EASING_STOPPING, s = n.AppConfig.gameConfig.SlotStyle.USE_BOUNCE_EASING_STOP_SPIN_QUADTIME; let e = this.pb; for (let n = 0; n < this.kp.length; n++) { e += 0 === n ? this.jp / 2 - this.kp[n].megaHeight / 2 : this.kp[n].megaHeight / 2; const r = e; e += this.kp[n].megaHeight / 2; const h = this.Kb(); i.kX.easeTo(s, this.kp[n].position, { y: r - 12 }, 0, (() => { i.kX.easeTo(t, this.kp[n].position, { y: r }, 0, null, null, h) }), null, i.oY.Quadratic.Out) } i.b2.setTimeout((n.AppConfig.gameConfig.SlotStyle.DISABLE_TIME_EASING_STOPPING ? 0 : t) + s + 33, (() => { this.ab = ie.EASING_END })), this.ab = ie.WAITING, this.sb = 0, n.AppConfig.gameConfig.SlotStyle.NO_WAIT_TIME_EASING_STOPPING && this.mb.getSymbols().forEach((t => { t.showSymbolIdleAnim(!0) })) } } else { const t = Math.abs(this.Zm - this.qm) % this.jp, i = this.jp / 2 - t, s = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_BOUND, e = s / n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_BOUND_FRAME; this.Jm > 0 ? (i + this.sb > this.jp && (this.sb = Math.floor(this.jp - i)), this.sb > this.Jm && (this.sb = this.Jm), this.Jm -= this.sb) : (s < Math.abs(this.Jm) ? (this.sb = this.Jm / n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_BOUND_FRAME, this.Jm -= this.sb) : this.sb = -e, t < Math.abs(this.sb) && (this.sb = 0, this.Yb(-t))) } else this.ab === ie.TURBO_END_SPIN ? this.Jm > n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_MIN_SPEED * t ? (this.sb = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_MIN_SPEED * t, this.sb > this.jp && (this.sb = this.jp - 25), this.Jm -= this.sb) : (this.Yb(this.Jm), this.sb = 0, this.Jm = 0) : this.ab === ie.EASING_END && (this.sb = 0, this.ab = ie.IDLE, this.onReelStop(this.km), this.Zm = this.qm); this.sb > this.jp - 25 && (this.sb = this.jp - 25), this.Zm += this.sb } this.qb(), 0 === this.sb && this.ab !== ie.WAITING && this.ab !== ie.ON_STACK && (this.ab != ie.IDLE && (this.ab = ie.IDLE, this.onReelStop(this.km)), this.Zm = this.qm) } qb() { this.kp.forEach((t => { t.y += this.sb })); const t = this.kp[0], s = t.y, e = t.megaHeight, r = s - (this.pb + e / 2 - this.jp / 2); if (r > .15 * this.jp) { const t = this.kp.pop(); this.kp.splice(0, 0, t); const h = r; if (this.ab !== ie.END_SPIN && this.ab !== ie.WAITING && this.ab !== ie.ON_STACK) { if (this.ab === ie.STOPPING || this.ab === ie.NEAR_WIN_END) { let s = this.ib.pop(); for (; s && s === n.AppConfig.gameConfig.SymbolType.SymbolNull && this.ib.length;) s = this.ib.pop(); s && (s === n.AppConfig.gameConfig.SymbolType.SymbolNull ? (s = i.cQ.gameUtils.getSymbolOutside(!this.lb, null, this.Wp), t.resetSymbol(s), t.isInResultShow = !1) : t.resetSymbol(s), 0 === this.ib.length && (this.vb && this.showSymbolBlur(!1), this.ab === ie.NEAR_WIN_END ? (this.Jm = this.jp - h, n.GameSceneBase.gameScene.updateReelWay(this.Wp)) : this.Cm ? (this.Jm = this.jp - h, this.ab = ie.TURBO_END_SPIN) : (this.Jm = this.jp - h, this.Jm += n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_BOUND, this.ab = ie.END_SPIN, n.GameSceneBase.gameScene.updateReelWay(this.Wp)))) } else { this.vb || this.ab !== ie.SPINNING || this.showSymbolBlur(!0); const n = i.cQ.gameUtils.getSymbolOutside(!this.lb, null, this.Wp, this.ib); t.resetSymbol(n), t.isInResultShow = !1 } t.y = s - e / 2 - t.megaHeight / 2 } } } Yb(t) { this.kp.forEach((i => { i.y += t })) } showSymbolBlur(t) { this._b && (this.kp.forEach((i => { i.showBlur(t) })), this.vb = t) } isSymbolBlur() { return this.vb } getCurrentSpinState() { return this.ab } startReelSpin(t = 0, s = Qs.NORMAL) { this.mb.enableClipping(), this.Cm = s === Qs.TURBO, this.Cm && (t = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TIME_DELAY), i.b2.clearTimeout(this.bb), i.b2.clearTimeout(this.wb), this.wb = i.b2.setTimeout(t, this.startSpin.bind(this, s)), this.ab = ie.ON_STACK, this.km = s, this.eb = 0, this.hb = 0 } isStop() { return this.mb.setOrderDisplay(), 0 === this.sb && this.ab === ie.IDLE } onReelStop(t) { this.mb.setOrderDisplay(), this.mb.sortChildren(), this.checkErrorDisplay(), super.onReelStop(t) } stopReelAt(t, s = 0) { this.Cm && (s = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TIME_TURBO), i.b2.clearTimeout(this.bb), i.b2.clearTimeout(this.wb), this.bb = i.b2.setTimeout(s, this.stopReel.bind(this, t)) } stopReelAtNearWin(t, s = 0) { this.Cm && (s = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TIME_TURBO_NEAR_WIN), i.b2.clearTimeout(this.bb), i.b2.clearTimeout(this.wb), this.bb = i.b2.setTimeout(s, this.stopReelNearWin.bind(this, t)) } $b(t) { return this.hb += t, this.Zb(this.hb) } Zb(t) { const i = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_TIME_NEAR_WIN_END, s = Math.pow(i, 3); if (t > i) return 0; return Math.pow(i - t, 3) / s * n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_MAX_SPEED } Vb(t) { const i = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_MAX_SPEED, s = t / n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_BOUND_TIME, e = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_BOUND_MAGIC_NUMBER; return Math.min(((e + 1) * s * s * s - e * s * s) * i, i) } Jb(t) { const i = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_MAX_SPEED, s = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_BOUND_TIME; this.hb -= t; const e = this.hb / s, r = n.AppConfig.gameConfig.SlotStyle.SYMBOL_SPIN_BOUND_MAGIC_NUMBER; return Math.min(((r + 1) * e * e * e - r * e * e) * i, i) } zb(t) { return 1 - Math.pow(1 - t, 3) } Kb() { switch (n.AppConfig.gameConfig.SlotStyle.BOUNCE_LEVEL_EASING_STOP_SPIN) { case 3: return this.gb; case 2: return i.oY.Elastic.Out; default: return this.zb } } setTurboMode(t) { this.Cm = t } isTurboModeEnabled() { return this.Cm } } class he { constructor(t) { this.Pm = [], this.Pm = t.getReelList(), t.subscribeReelStopEvent(this.reorderSymbolsAtReelIndex.bind(this)) } reorderSymbols() { this.Pm && (this.Pm.forEach((t => { this.Qb(t) })), n.AppConfig.gameConfig.GameBoard.CLIPPING_MASK_TYPE === n.MaskType.BOARD && this.Pm[0].parent.sortChildren()) } reorderSymbolsAtReelIndex(t) { this.Qb(this.Pm[t]), n.AppConfig.gameConfig.GameBoard.CLIPPING_MASK_TYPE === n.MaskType.BOARD && this.Pm[0].parent.sortChildren() } Qb(t) { t.getSymbols().forEach(((t, i) => { this.tw(t, i) })), n.AppConfig.gameConfig.GameBoard.CLIPPING_MASK_TYPE === n.MaskType.REEL && t.sortChildren() } tw(t, i) { if (i > n.AppConfig.gameConfig.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL) return void(t.zIndex = 0); if (n.AppConfig.gameConfig.SymbolType.isOnTop(t.type)) t.zIndex = 2; else { t.zIndex = .1 } } } class oe { static checkReelNearWinActive(t) { let i = 0; const n = []; for (let s = 0; s < M.GameBoard.NUMBER_OF_REELS; s++) { 2 === i && M.SlotStyle.REEL_NEAR_WIN_CAN_ACTIVE.indexOf(s) >= 0 && n.push(s); for (let n = 1; n <= M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL; n++) !0 === M.GameBoard.BOARD_REAL_SYMBOL_MAPPING[s][n - 1] && t[s][n].toString().startsWith(M.SymbolType.SymbolScatter) && i++ } return n } static checNumScatter(t) { let i = 0; for (let n = 0; n < M.GameBoard.NUMBER_OF_REELS; n++) for (let s = 1; s <= M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL; s++) !0 === M.GameBoard.BOARD_REAL_SYMBOL_MAPPING[n][s] && t[n][s].startsWith(M.SymbolType.SymbolScatter) && i++; return i } static checkSpecialSymbolAppear(t, i, n = 1) { let s = !1, e = !1, r = !1; for (let h = n; h <= M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL; h++) switch (t[i][h]) { case M.SymbolType.SymbolWild: e = !0; break; case M.SymbolType.SymbolScatter: s = !0; break; case M.SymbolType.SymbolBonus: r = !0 } return [s, e, r, !1] } static createMegaMatrixResume(t, i) { const n = []; let s = 0; for (let e = 0; e < i.length; e++) { const r = []; for (let n = 0; n < M.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; n++) n >= 0 && n < i[e] && (r.push(t[s]), s++); n.push(r) } return { megaSymbol: n, megaHSymbol: [] } } static getMegaMatrix(t, i, n) { var s; const e = [], r = n.reduce(((t, i) => t + i)); let h = 1; if (!t) { for (let t = 0; t < n.length; t++) { const t = []; for (let i = 0; i < M.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; i++) t.push(M.SymbolType.SymbolNull); e.push(t) } if (M.HAS_HORIZONTAL_REEL) { const t = []; for (let i = 0; i < M.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; i++) t.push(M.SymbolType.SymbolNull); e.push(t) } return e } h = r > t.length ? 1 : 0; for (let i = 0; i < n.length; i++) { const r = [], o = t[i]; let u = 0; for (let t = 0; t < M.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; t++) if (t >= h && t <= n[i]) { if (null == (s = o[u]) ? void 0 : s.s) { r.push(`${o[u].s}_${o[u].r}_${o[u].f}_${o[u].m}`) } else r.push(M.SymbolType.SymbolNull); u++ } else r.push(M.SymbolType.SymbolNull); e.push(r) } if (M.HAS_HORIZONTAL_REEL) { const t = [], n = [...i]; h = 0; for (let i = 0; i < M.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; i++) if (i >= h) { const i = n.pop(); if (null == i ? void 0 : i.s) { t.push(`${i.s}_${i.r}_${i.f}_${i.m}`) } else t.push(M.SymbolType.SymbolNull) } else t.push(M.SymbolType.SymbolNull); e.push(t) } return e } static createLineMatrixResume(t, i) { const n = []; let s = 0; for (let e = 0; e < i.length; e++) { const r = []; for (let n = 0; n < M.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; n++) n > 0 && n < i[e] && r.push(t[s + (n - 1) * M.GameBoard.NUMBER_OF_REELS]); s++, n.push(r) } return { symbol: n } } static getLineMatrix(t, i) { const n = [], s = i.reduce(((t, i) => t + i)); let e = 1; if (!t) { for (let t = 0; t < i.length; t++) { const t = []; for (let i = 0; i < M.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; i++) t.push(M.SymbolType.SymbolNull); n.push(t) } return n } let r = 0; e = s > t.length ? 1 : 0; for (let s = 0; s < i.length; s++) { const h = []; for (let n = 0; n < M.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; n++) if (n > e && n <= i[s]) { h.push(t[r + (n - 1) * M.GameBoard.NUMBER_OF_REELS]) } else h.push(M.SymbolType.SymbolNull); r++, n.push(h) } return n } static convertNativePosToReelIndex(t, i, n, s) { i = void 0 !== i ? i : M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL, n = void 0 !== n ? n : 0, s = void 0 !== s ? s : 1; return [Math.floor(t / i), Math.round(t % i) + s] } static getSymbolFromPaylineIndex(t, i) { const [n, s] = this.convertNativePosToReelIndex(i); return t[n].getSymbol(s) } static getSymbolOutside(t = !1, i, n = 0, s = []) { let e, r; const h = I.kc.getInst().spinInfo, o = h || I.kc.getInst().gameInfo, u = o && o.freeGame || h && h.featureResults.accmWin > 0; do { r = Math.floor(50 * Math.random()) < 5, e = 3 === Math.floor(100 * Math.random()) ? 10 : Math.floor(10 * Math.random()) } while (0 === e || r && 10 === e || u && 2 === n && 10 === e); const a = M.SymbolList[e]; let l = ""; const c = M.SymbolLevelList[M.SymbolLevelList.length - 1]; let f = t ? M.SymbolSize[Math.floor(Math.random() * M.SymbolSize.length)] : c; i && (f = Number(i.r)); let v = "0"; return (u && 2 === n || r && 0 !== n && 4 !== n) && (v = "2"), l = `${a}_${f}_${v}_0`, l } static checkSymbolHaveIdleAnim(t) { return t === M.SymbolType.SymbolScatter || t === M.SymbolType.SymbolWild } static checkSymbolHaveIdleAnimX(t) { let i; return M.SpecSymbolIdle.indexOf(t) > -1 ? i = "idle" : M.SpecSymbol.indexOf(t) > -1 && (i = "F8" === t ? "s" : `s_${t.toLocaleLowerCase()}`), i } static getCombineAnimName(t, i = "normal") { const n = Object.keys(this.nw); let s = n[0]; return n.some((i => { if (this.nw[i].indexOf(t) > -1) return s = i, !0 })), s.replace("%s", "explose" === i ? "explose_" : "") } static betHistoryGetSymbolImageStrings(t, i, n) { const s = { symbol: null, frame: null }; return s.symbol = `${t}_${i}_${n}.webp`, s } static getSpecialSpinType(t, i) { return !i && t && t.buyFeature > 0 ? i = 1 == t.buyFeature ? "Buy Freegame" : "Buy Bonus" : t && t.jpWinAmount ? i = "Jackpot" : t && t.maxWinRatioHit && t.maxWinRatioHit.isMaxHit ? i = "Maxhit" : t.gbInfo && (i = "GambleGame"), i } } oe.nw = { win: [], "ef_%sscatter": ["13"], "ef_%swild": ["1"] }; class ue extends zs { constructor() { super(...arguments), this.sw = new r.E9(0, 0) } updateNumSymbolOnBoard(t) { t !== this.Dp && this.ew(t) } setOrderDisplay() { this.kp.forEach(((t, i) => { M.SymbolType.isOnTop(t.type) || (t.zIndex = i / 10) })) } ew(t) { this.sw.y = (this.Dp - t) * M.GameBoard.SYMBOL_HEIGHT; i.kX.to(M.SlotStyle.REEL_EXPAND_TIME, this.sw, { y: 0 }, 0, null, (() => { this.$p(this.sw.y) })), this.Dp = t } updateCascadeAllSymbolPos(t = !1) { for (let i = this.kp.length - 1; i >= 0; i--) if (this.kp[i].isBreakInCascade) { const n = this.kp.splice(i, 1).pop(), s = this.kp[this.kp.length - 1]; n.isBreakInCascade = !1, n.setPosition(s.x, s.y + s.megaHeight / 2 + 20 * n.megaHeight), n.resetStateSymbol(), n.isInResultShow = !1, n.visible = t, this.kp.push(n) } this.sortChildren() } } class ae extends ee { constructor() { super(...arguments), this.rw = !1, this.hw = !1, this.ow = !1, this.uw = -1 } startSpin(t, i, n = !0) { super.startSpin(t, i, n), this.Ob === Js.NORMAL && (this.rw = !1, this.hw = !1, this.uw = -1) } onSpinDataReceived(t) { let i = []; i = oe.getMegaMatrix(t.megaSymbol, t.megaHSymbol, M.GameBoard.GAME_TABLE_FORMAT), super.onSpinDataReceived(t) } Bb(t, i) { this.Ob === Js.CASCADE && (this.ow = !1) } Fb(t, i) { super.Fb(t, i), this.aw(t, i) } aw(t, i) { let n = []; n = oe.getMegaMatrix(this.Ib.megaSymbol, this.Ib.megaHSymbol, M.GameBoard.GAME_TABLE_FORMAT); const [s, e, r, h] = oe.checkSpecialSymbolAppear(n, t); if (h && !this.hw && (this.hw = !0), this.Ob === Js.CASCADE) { if (!r || this.ow) return; this.rw = !1, this.uw = -1, this.ow = !0 }(s || r) && (1 === t && !this.rw || t > 1 && this.rw && t - this.uw == 1 && !(i === Qs.FAST_TO_RESULT || i === Qs.TURBO)) && (this.rw = !0, this.uw = t) } } class le extends Ks { constructor() { super(...arguments), this.lw = 0 } init(t, i = !1, s = 0, e) { this.addChild(this.Oo), this.tm && (this._m = new c.j, this.Oo.addChild(this._m), this._m.anchor.set(.5)), this.Oo.anchor.set(.5), this.pm = i, this.Wp = s, this.bm = !1, this.wm = e, this.loadSymbol(t), this.rp = n.AppConfig.gameConfig.GameBoard.SYMBOL_DIM_COLOR; const h = n.AppConfig.gameConfig.GameBoard.SYMBOL_WIDTH, o = n.AppConfig.gameConfig.GameBoard.SYMBOL_HEIGHT; this.hitArea = new r.Ae(-h / 2, -o / 2, h, o), this.on("pointerup", this.onClick.bind(this)), this.interactive = !0 } setDimSymbol(t = !0, s = !1) { const e = t ? this.rp : this.hp, r = this.Oo.tint; if (s || r !== e && !this.isBreakInCascade && !this.bm) { if (s) this.im && (this.im.tint = e, this.cw && this.cw.tint && (this.cw.tint = e)), this.Oo.tint = e, this.tm && (this._m.tint = e); else { const t = { color: 255 & r }; i.kX.to(n.AppConfig.gameConfig.SlotStyle.SYMBOL_FADED_DIM_TIME, t, { color: 255 & e }, 0, null, (() => { const i = t.color << 16 & 16711680 | t.color << 8 & 65280 | 255 & t.color; this.im && (this.im.tint = i, this.cw && this.cw.tint && (this.cw.tint = i)), this.Oo.tint = i, this.tm && (this._m.tint = i) })) } t ? this.Nm() : this.Em() } } playWinAnim(t = !1) { if (this.isBreakInCascade) return; "0" !== this.megaSymbol.f && i.b2.setTimeout(250, (() => { s.getInst().isPlaying("SFX_SYMBOL_RANDOM") || "2" === this.megaSymbol.f || s.getInst().playSfx("SFX_SYMBOL_RANDOM"), s.getInst().isPlaying("SFX_SYMBOL_WILD") || "2" !== this.megaSymbol.f || s.getInst().playSfx("SFX_SYMBOL_WILD"), this.playUpgradeAnim() })), this.isBreakInCascade = "0" === this.megaSymbol.f, this.bm = !0, this.setDimSymbol(!1), this.Oo.visible = !1; const n = this.vm(); n.visible = !0, n.state.clearTracks(), n.skeleton.setToSetupPose(); const e = "explode"; if (s.getInst().isPlaying("SFX_SYMBOL_ELIMINATE") || s.getInst().playSfx("SFX_SYMBOL_ELIMINATE"), this.fm.s !== M.SymbolType.SymbolWild && this.fm.s !== M.SymbolType.SymbolScatter) { n.state.setAnimation(this.Yp, "2" === this.fm.f ? "gold" : "normal", !0), n.state.setAnimation(this.zp, "win", !1), n.state.setAnimation(this.zp, e, !1) } this.fm.s == M.SymbolType.SymbolWild && (n.stateData.setMix("idle", "win", .1), n.state.setAnimation(this.Yp, "win", !0), n.state.setAnimation(this.Yp, e, !1)) } playHightlightAnim(t = !1) { this.bm = !0, this.setDimSymbol(!1); const s = this.vm(); this.Oo.visible = !1, s.visible = !0, s.state.clearTrack(this.Yp), s.skeleton.setToSetupPose(), this.megaSymbol.s === M.SymbolType.SymbolScatter ? (s.stateData.setMix("idle", "charge", .1), s.state.setAnimation(this.Yp, "charge", !0), this.cw ? (this.cw.stateData.setMix("sym11_idle", "sym11_charge", .1), this.cw.state.addAnimation(this.zp, "sym11_charge", !0, 0)) : (this.cw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.cw.stateData.setMix("sym11_idle", "sym11_charge", .1), this.cw.state.addAnimation(this.zp, "sym11_charge", !0, 0), this.cw.visible = !0, this.addChild(this.cw), i.S9.Set(this.cw, i.X2.ReelSymbolsFXFront)), this.fw ? (this.fw.stateData.setMix("sym11_idle_btm", "sym11_charge_btm", .1), this.fw.state.addAnimation(this.zp, "sym11_charge_btm", !0, 0)) : (this.fw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.fw.stateData.setMix("sym11_idle_btm", "sym11_charge_btm", .1), this.fw.state.addAnimation(this.zp, "sym11_charge_btm", !0, 0), this.fw.visible = !0, this.addChild(this.fw), i.S9.Set(this.fw, i.X2.ReelSymbolsFXBottom))) : s.state.setAnimation(this.Yp, "combine", !0) } playActiveAnim(t = !1) { this.bm = !0, this.setDimSymbol(!1); const s = this.vm(); this.Oo.visible = !1, s.visible = !0, s.state.clearTrack(this.Yp), s.skeleton.setToSetupPose(); const e = "activate"; let r = 0; return this.megaSymbol.s === M.SymbolType.SymbolScatter ? (s.stateData.setMix("charge", e, .25), s.stateData.setMix("idle", e, .25), r = s.state.setAnimation(this.Yp, e, !1).animation.duration, this.cw ? (this.cw.stateData.setMix("sym11_charge", "sym11_activate", .25), this.cw.stateData.setMix("sym11_idle", "sym11_activate", .25), this.cw.state.setAnimation(this.zp, "sym11_activate", !1)) : (this.cw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.cw.stateData.setMix("sym11_charge", "sym11_activate", .25), this.cw.stateData.setMix("sym11_idle", "sym11_activate", .25), this.cw.state.setAnimation(this.zp, "sym11_activate", !1), this.cw.visible = !0, this.addChild(this.cw), i.S9.Set(this.cw, i.X2.ReelSymbolsFXFront)), this.fw ? (this.fw.stateData.setMix("sym11_charge_btm", "sym11_activate_btm", .25), this.fw.stateData.setMix("sym11_idle_btm", "sym11_activate_btm", .25), this.fw.state.setAnimation(this.zp, "sym11_activate_btm", !1)) : (this.fw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.fw.stateData.setMix("sym11_charge_btm", "sym11_activate_btm", .25), this.fw.stateData.setMix("sym11_idle_btm", "sym11_activate_btm", .25), this.fw.state.setAnimation(this.zp, "sym11_activate_btm", !1), this.fw.visible = !0, this.addChild(this.fw), i.S9.Set(this.fw, i.X2.ReelSymbolsFXBottom))) : r = s.state.setAnimation(this.zp, "combine", !0).animation.duration, 1e3 * r } dw() { const t = this.wm(this); return n.AppConfig.gameConfig.GameBoard.BOARD_REAL_SYMBOL_MAPPING[this.Wp][t - 1] || !1 } forceToIdle() { const t = "idle", s = this.vm(); s.visible = !0, this.Im() ? this.megaSymbol.s === M.SymbolType.SymbolScatter && (s.stateData.setMix("trigger", t, .25), s.state.addAnimation(this.Yp, t, !0, 0), this.cw ? this.cw.state.addAnimation(this.zp, "sym11_idle", !0, 0) : (this.cw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.cw.state.addAnimation(this.zp, "sym11_idle", !0, 0), this.cw.visible = !0, this.addChild(this.cw), i.S9.Set(this.cw, i.X2.ReelSymbolsFXFront)), this.fw ? this.fw.state.addAnimation(this.zp, "sym11_idle_btm", !0, 0) : (this.fw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.fw.state.addAnimation(this.zp, "sym11_idle_btm", !0, 0), this.fw.visible = !0, this.addChild(this.fw), i.S9.Set(this.fw, i.X2.ReelSymbolsFXBottom))) : (this.im && (this.im.visible = !1), this.Oo.visible = !0, this.Sm()) } playSmokeDropEff() {} playSymbolDropEffect() {} playUpgradeAnim(t = !0, s = "") { if (this._w = !0, this.Oo.visible = !0, t && "2" === this.megaSymbol.f) { this.resetSymbol(`${M.SymbolType.SymbolWild}_${this.fm.r}_0_${this.fm.m}`), this._w = !1, this.isBreakInCascade = !1, this.bm = !1; const t = this.vm(), s = "transform", e = "idle"; this.megaSymbol.s === M.SymbolType.SymbolWild && (this.cw ? this.cw.state.setAnimation(this.zp, "sym1_idle", !0) : (this.cw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.cw.state.setAnimation(this.zp, "sym1_idle", !0), this.cw.visible = !0, this.addChild(this.cw), i.S9.Set(this.cw, i.X2.ReelSymbolsFXTop)), t.stateData.setMix(s, e, .1), t.state.setAnimation(this.Yp, s, !1), t.state.addAnimation(this.Yp, e, !0, 0), t.visible = !0, this.Oo.visible = !1) } } IsInUpgrade() { return this._w } showSymbolIdleAnim(t) { if (t && this.Im()) if (!i.cQ.gameUtils.checkSymbolHaveIdleAnim(this.type) || this.im && this.im.visible || !this.isInResultShow) i.cQ.gameUtils.checkSymbolHaveIdleAnim(this.type) || (this.im && (this.im.visible = !1), this.Oo.visible = !0, this.Sm()); else { const t = "idle", s = "trigger", e = this.vm(); e.visible = !0, this.Oo.visible = !1, this.megaSymbol.s === M.SymbolType.SymbolScatter ? this.dw() ? (n.SoundManagerBase.getInst().playSfx("SFX_SYMBOL_SCATTER"), e.stateData.setMix(s, t, .25), e.state.setAnimation(this.Yp, s, !1), e.state.addAnimation(this.Yp, t, !0, 0), this.cw ? (this.cw.stateData.setMix("sym11_trigger", "sym11_idle", .25), this.cw.state.setAnimation(this.zp, "sym11_trigger", !1), this.cw.state.addAnimation(this.zp, "sym11_idle", !0, 0)) : (this.cw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.cw.stateData.setMix("sym11_trigger", "sym11_idle", .25), this.cw.state.setAnimation(this.zp, "sym11_trigger", !1), this.cw.state.addAnimation(this.zp, "sym11_idle", !0, 0), this.cw.visible = !0, this.addChild(this.cw), i.S9.Set(this.cw, i.X2.ReelSymbolsFXFront)), this.fw ? (this.fw.stateData.setMix("sym11_trigger_btm", "sym11_idle_btm", .25), this.fw.state.setAnimation(this.zp, "sym11_trigger_btm", !1), this.fw.state.addAnimation(this.zp, "sym11_idle_btm", !0, 0)) : (this.fw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.fw.stateData.setMix("sym11_trigger_btm", "sym11_idle_btm", .25), this.fw.state.setAnimation(this.zp, "sym11_trigger_btm", !1), this.fw.state.addAnimation(this.zp, "sym11_idle_btm", !0, 0), this.fw.visible = !0, this.addChild(this.fw), i.S9.Set(this.fw, i.X2.ReelSymbolsFXBottom))) : (e.stateData.setMix(s, t, .25), e.state.setAnimation(this.Yp, t, !0), this.cw ? this.cw.state.setAnimation(this.zp, "sym11_idle", !0) : (this.cw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.cw.state.setAnimation(this.zp, "sym11_idle", !0), this.cw.visible = !0, this.addChild(this.cw), i.S9.Set(this.cw, i.X2.ReelSymbolsFXFront)), this.fw ? this.fw.state.setAnimation(this.zp, "sym11_idle_btm", !0) : (this.fw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.fw.state.setAnimation(this.zp, "sym11_idle_btm", !0), this.fw.visible = !0, this.addChild(this.fw), i.S9.Set(this.fw, i.X2.ReelSymbolsFXBottom))) : (e.state.setAnimation(this.Yp, t, !0), this.cw ? this.cw.state.setAnimation(this.zp, "sym1_idle", !0) : (this.cw = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.cw.state.setAnimation(this.zp, "sym1_idle", !0), this.cw.visible = !0, this.addChild(this.cw), i.S9.Set(this.cw, i.X2.ReelSymbolsFXTop))) } else this.im && (this.im.visible = !1), this.Oo.visible = !0, this.Sm() } Sm() { this.cw && (this.cw.visible = !1, i.S9.Reset(this.cw), n.SymbolSpinePoolMgr.getInst().returnSymbolSpine("symbol_effect", this.cw), this.cw = null), this.fw && (this.fw.visible = !1, i.S9.Reset(this.fw), n.SymbolSpinePoolMgr.getInst().returnSymbolSpine("symbol_effect", this.fw), this.fw = null) } Am() { const t = this.type; this.Oo.texture = this.Tm(t, "2" == this.fm.f ? this.gm ? "gold_blur" : "gold" : this.gm ? "blur" : "normal") } } class ce extends u.W2 { constructor() { super(...arguments), this.mw = [], this.bw = [], this.ww = null } init(t, i) { this.Pm = t, this.Dm = i; for (let i = 0; i < this.Pm.length; i++) for (let s = 1; s <= n.AppConfig.gameConfig.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL; s++) { const e = t[i].getSymbol(s).getGlobalPosition(), r = this.toLocal(e), h = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"); h.position.set(r.x, r.y), this.mw.push(h), this.addChild(h), h.visible = !1 } } validateWinMatrix(t, i) {} runWinValidation(t, i, n, s, e) { return r = this, h = null, o = function*() { return !1 }, new Promise(((t, i) => { var n = t => { try { e(o.next(t)) } catch (t) { i(t) } }, s = t => { try { e(o.throw(t)) } catch (t) { i(t) } }, e = i => i.done ? t(i.value) : Promise.resolve(i.value).then(n, s); e((o = o.apply(r, h)).next()) })); var r, h, o } playLoopCombineAnimation(t, i) {} onPause() { this.mw.forEach((t => { this.bw.push(t.visible), t.visible = !1 })) } onResume() { this.mw.forEach(((t, i) => { t.visible = this.bw[i] })), this.bw.length = 0 } skipWinCombineShow() { i.b2.clearInterval(this.ww), this.Pm.forEach((t => { t.setDimAllSymbol(!1), t.showStaticImageSymbols() })), this.mw.forEach((t => { t.visible = !1 })) } updateAllCascadeSymbolPos(t = n.AppConfig.gameConfig.SlotStyle.SHOW_REWARD_TIME) { return new Promise((s => { i.b2.setTimeout(t * n.AppConfig.gameConfig.SlotStyle.SPEED_UP_CASCADE_TIME, (() => { this.Pm.forEach((t => { t.updateCascadeAllSymbolPos(), t.setDimAllSymbol(!1) })), s() })), i.b2.setTimeout(t, (() => { this.mw.forEach((t => { t.visible = !1 })) })) })) } gw() { this.Pm.forEach((t => { t.showStaticImageSymbols() })), this.mw.forEach((t => { t.visible = !1 })) } } var fe = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); class ve extends ce { constructor() { super(...arguments), this.yw = {}, this.Ew = 0, this.Sw = [], this.Aw = [] } init(t, i) { this.Pm = t, this.Dm = i; for (let i = 0; i < this.Pm.length; i++) for (let s = 1; s <= M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL; s++) { const e = t[i].getSymbol(s).getGlobalPosition(), r = this.toLocal(e), h = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), o = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"); h.position.set(r.x, r.y), o.position.set(r.x, r.y), this.Sw.push(h), this.Aw.push(o), this.addChild(h), this.addChild(o) } } runWinValidation(t, n, e, h, o = 1, u = !0) { return fe(this, null, (function*() { var u, a, l, c, f, v, d, _, p; const m = n.wayWins; this.yw = {}, xe.getInst().resetScoreList(); const b = !1, w = (null == (u = n.respinGame) ? void 0 : u.symPos) || (null == (l = null == (a = n.freeGame) ? void 0 : a.respinGame) ? void 0 : l.symPos), g = (null == (c = n.respinGame) ? void 0 : c.frameIdxBf) || (null == (v = null == (f = n.freeGame) ? void 0 : f.respinGame) ? void 0 : v.frameIdxBf), y = (null == (d = n.respinGame) ? void 0 : d.hPos) || (null == (p = null == (_ = n.freeGame) ? void 0 : _.respinGame) ? void 0 : p.hPos); if (m) this.yw = this.Tw(m, t); else { const i = [...null != w ? w : [], ...null != g ? g : []]; this.yw = this.Ow(t, i, y) } let E = 0; if (M.SymbolList.forEach((t => { E += this.yw[t] ? this.yw[t].length : 0 })), 0 === E) return !1; const S = Object.keys(this.yw); S.length > 0 && s.getInst().playSfx("SFX_PAYLINE"); const A = o, T = []; let O = 1500; const I = [ [], [], [], [], [] ]; let N = null, R = null; for (let t = 0; t < S.length; t++) { const n = [], s = [], e = this.yw[S[t]]; for (let t = 0; t < e.length; t++) { let h = function(t) { return t.every((i => i === t[0])) }; const o = e[t], u = Math.floor(o / M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL), a = Math.round(o % M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL) + 1; I[u].push(a), this.Pm[u].setDimSymbol(a, !1), T.indexOf(o) < 0 && T.push(o); const l = this.Pm[u].getSymbol(a), c = l.megaSymbol, f = "explode", v = "win", d = this.toLocal(l.getGlobalPosition()), _ = "win_light", p = "off"; h(S) ? (N = !0, R = c) : N = !1, i.b2.setTimeout(50 * u, (() => { "1" != c.s ? (this.Sw[o].state.setAnimation(0, v, !0), this.Aw[o].state.setAnimation(0, _, !0)) : (this.Sw[o].stateData.setMix("sym1_idle", "sym1_win", .1), this.Sw[o].state.setAnimation(1, "sym1_win", !1), this.Aw[o].state.setAnimation(0, v, !0)) })), i.b2.setTimeout(600, (() => { this.Pm[u].playWin(a, b), "1" != c.s ? (this.Sw[o].state.setAnimation(0, f, !1), this.Aw[o].state.setAnimation(0, p, !1)) : this.Aw[o].state.setAnimation(0, "explode", !1) })), this.Sw[o].renderable = !0, this.Sw[o].visible = !0, this.Sw[o].position.set(d.x, d.y), this.Aw[o].renderable = !0, this.Aw[o].visible = !0, this.Aw[o].position.set(d.x, d.y), i.S9.Set(this.Sw[o], i.X2.ReelSymbolsFXFront), i.S9.Set(this.Aw[o], i.X2.ReelSymbolsFXBottom); this.Pm[u].getSymbol(a).type !== M.SymbolType.SymbolWild ? n.push(new r.E9(u, a)) : s.push(new r.E9(u, a)) } false } if (N) this.runWinSound(R); else { Math.random() < .5 ? s.getInst().playSfx("VO_AHHA_QUANZHONG_MAN") : s.getInst().playSfx("VO_AHHA_QUANZHONG_WOMAN") } yield i.cQ.delay(100), this.Dm.sortChildren(), this.Pm.forEach((t => { t.sortChildren() })), O = Math.min(O, M.SlotStyle.SHOW_REWARD_TIME); return this.Pm.forEach(((t, i) => { for (let n = 0; n < M.GameBoard.MAX_NUMBER_SYMBOL_PER_REEL; n++) !1 === I[i].includes(n) && t.setDimSymbol(n, !0) })), this.Iw(h, A, e.bind(this)), yield this.updateAllCascadeSymbolPos(O), !0 })) } runWinSound(t) { switch (t.s) { case "2": s.getInst().playSfx("VO_FACAI"); break; case "3": s.getInst().playSfx("VO_HONGZHONG"); break; case "4": s.getInst().playSfx("VO_BAIBAN"); break; case "5": s.getInst().playSfx("VO_BA_WAN"); break; case "6": s.getInst().playSfx("VO_WU_TONG"); break; case "7": s.getInst().playSfx("VO_WU_TIAO"); break; case "8": s.getInst().playSfx("VO_SAN_TONG"); break; case "9": s.getInst().playSfx("VO_ER_TONG"); break; case "10": s.getInst().playSfx("VO_ER_TIAO") } } playLoopCombineAnimation(t, n) { if (!(t.length > 0)) return; let s = 0; i.b2.clearInterval(this.ww), this.ww = i.b2.setInterval(2500, (() => { s > t.length - 1 && (s = 0), this.gw(), this.Nw(t[s], n), s++ })) } Nw(t, n) { xe.getInst().resetScoreList(), this.Pm.forEach((t => { t.unhighlightAllSymbols() })); const s = this.Tw([t], n), e = []; let h = 1500; const o = [], u = [], a = t.hits, l = s[t.symbol.toString()]; for (let t = 0; t < l.length; t++) { const n = l[t], s = Math.floor(n / M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL), a = Math.round(n % M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL) + 1; this.Pm[s].replayHightlightAnim(a), this.Pm[s].setDimSymbol(a, !1, !0), e.indexOf(n) < 0 && e.push(n); const c = this.Pm[s].getSymbol(a).type, f = oe.getCombineAnimName(c), v = oe.getCombineAnimName(c, "explose"); this.Sw[n].stateData.setMix(v, f, .32), h = 1e3 * this.mw[n].state.setAnimation(0, v, !1).animation.duration, h += 1e3 * this.mw[n].state.addAnimation(0, f, !0, 0).animation.duration, this.mw[n].renderable = !0, this.mw[n].visible = !0, i.S9.Set(this.mw[n], i.X2.ReelSymbolsFXTop); this.Pm[s].getSymbol(a).type[0] !== M.SymbolType.SymbolWild ? o.push(new r.E9(s, a)) : u.push(new r.E9(s, a)) } const c = t.win; if (0 === o.length) u.length > 0 && xe.getInst().addScore(c, this.Pm[u[0].x].getSymbol(u[0].y).getGlobalPosition()); else { const t = this.Rw(o, a); xe.getInst().addScore(c, this.Pm[t.x].getSymbol(t.y).getGlobalPosition()) } h = Math.min(h, 2500), xe.getInst().playScoreAnim(h, !0), this.Pm.forEach((t => { t.setDimAllSymbol() })) } Tw(t, i) { const n = {}; return t.forEach((t => { const s = t.box, e = t.symbol.toString(), r = []; let h = 0; for (let t = 0; t < M.GameBoard.NUMBER_OF_REELS; t++) for (let n = 1; n < M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL + 1; n++) { const o = t * M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL + n - 1; if (i[t][n] !== M.SymbolType.SymbolNull) { const u = i[t][n].split("_"); (u[0] === e || u[0] === M.SymbolType.SymbolWild) && s.indexOf(h) >= 0 && r.push(o), h++ } } n[e] = r })), n } Ow(t, i, n) { const s = {}; let e = 0; for (let n = 0; n < M.GameBoard.NUMBER_OF_REELS; n++) for (let r = 1; r < M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL + 1; r++) { const h = t[n][r]; if (h !== M.SymbolType.SymbolNull) { const t = n * M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL + r - 1; if (i.indexOf(e) >= 0 || h.split("_")[0] === h) { const i = h.split("_")[0]; s[i] ? s[i].push(t) : s[i] = [t] } e++ } } return s } Rw(t, i) { const n = [ [], [], [], [], [] ]; for (let i = 0; i < t.length; i++) { const s = t[i]; 3 === s.y ? n[s.x].unshift(s) : n[s.x].push(s) } let s = i < 4 ? 1 : 2; for (; s >= 0; s--) if (n[s].length) { let t = n[s][0]; for (let i = 0; i < n[s].length; i++) { Math.abs(t.y - 2.6) > Math.abs(n[s][i].y - 2.6) && (t = n[s][i]) } return t } return t[0] } Iw(t, i, n) { return fe(this, null, (function*() { const t = I.kc.getInst().spinInfo; if (this.Ew = 0, i < 2) return i; if (t && t.totalWin && t.totalWin > 0) { (() => { Re.getInst().updateShowPayline(this.yw, 0, !1, !0, i) }).bind(this) } return i })) } } class de { static createSymbolClass() { return new le } static createReelClass() { return new ue } static createSpinManagerClass() { return new ae } static createSpinControllerClass() { return new re } static createCascadeControllerClass() { return new se } static createWinLogicClass() { return new ve } } class _e extends he { tw(t, i) { if (i > M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL) return void(t.zIndex = 0); t.zIndex = M.SymbolType.isOnTop(t.type) ? 2 : .1 * i } } var pe = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); class me extends n.AutoUpdateContainer { constructor() { super(), this.Cm = !1, this.Pw = !1, this.xw = !1, this.Lw = !0, this.Cw = !0, this.up = 1, this.Uw = 0, this.kw = 0, this.countSound = 0, this.idleSoundArr = [{ sound: "VO_KAISHILO", delay: 4 }, { sound: "VO_KEYIKANDAO", delay: 8 }, { sound: "VO_CAN_FAIDI", delay: 6 }, { sound: "VO_CAN_PENGMIEGUAI", delay: 4 }, { sound: "VO_DAJIAXIAOXIN", delay: 8 }, { sound: "VO_ZIMO", delay: 6 }, { sound: "VO_CAN_SONGSAUDILA", delay: 8 }, { sound: "VO_BUHAOYISI", delay: 8 }, { sound: "VO_HAODAI", delay: 6 }, { sound: "VO_WANGDONG", delay: 8 }, { sound: "VO_WOYOUHULE", delay: 6 }], this.isDenomHadUpdated = !1 } initBoard() { this.Fw = new Ws, this.Fw.init(), this.addChild(this.Fw.getBgContainer()), this.Bw = new te, this.addChild(this.Bw); const t = this.Fw.getBgLayer(); this.addChild(t), this.Dw = new E.PY(n.ResourceManager.getSpine("gold_frame")), this.Dw.name = "GoldFrame", this.addChild(this.Dw), this.jw = new c.j(n.ResourceManager.getAtlasFrame("UI_multilanguage", "way")), this.jw.anchor.set(.5), this.jw.scale.y = -1; const i = this.Dw.skeleton.findSlotIndex("track_text_ways"); this.Dw.slotContainers[i].addChild(this.jw); const s = this.Fw.getBgIdleLayer(); this.addChild(s); const e = this.Fw.getFgIdleLayer(); this.addChild(e); const r = this.Fw.getFgSparkLayer(); this.addChild(r), this.Bw.init(de, this.initMatrix()), this.Bw.subscribeSpinEndedEvent(this.onSpinEnded.bind(this)), Re.getInst().updateBalance(I.kc.getInst().balance); new _e(this.Bw).reorderSymbols(), this.Gw = new $s, this.Hw = new Hs, this.Xw = new Xs, this.Vw = new E.PY(n.ResourceManager.getSpine("phoenix")), this.Vw.name = "Phoenix"; Re.getInst().getCharacterLayer().addChild(this.Vw), globalThis.isTurbo = ge.getInst().isTurboModeEnabled() } initMatrix() { const t = I.kc.getInst().gameInfo; let i = []; if (t && t.resumeLastMegaSymbol) { const n = oe.createMegaMatrixResume(t.resumeLastMegaSymbol, M.GameBoard.GAME_TABLE_RESUME_FORMAT); i = oe.getMegaMatrix(n.megaSymbol, [], M.GameBoard.GAME_TABLE_FORMAT) } else i = oe.getMegaMatrix(M.DefaultMegaMatrix[0].megaSymbol, [], M.GameBoard.GAME_TABLE_FORMAT); return i } onActive() { var t, e; if (I.kc.getInst().spinInfo) this.Dw.state.setAnimation(0, "idle", !0), this.Xw.playMulIdle(I.kc.getInst().spinInfo); else { this.Dw.state.setAnimation(0, "idle", !0); const i = I.kc.getInst().gameInfo; if (i) { this.Xw.playMulIdle(i), this.Lw = !1, Re.getInst().updateBetAmount(); const r = null != (e = null == (t = i.respinGame) ? void 0 : t.accmWin) ? e : 0; Re.getInst().updateWinAmount(r); if (i.freeGame) { Re.getInst().getSpinPanel().setShowFreeGameUI(!0), this.Fw.setShowFreegame(!0), this.Xw.updateUIFreegame(!0), this.up = i.freeGame.multiplier, this.Fw.updateMultiply(1 === this.up ? M.Control.DEFAULT_START_MULTIPLER_FREEGAME : this.up, !0), Re.getInst().getSpinPanel().updateFreegameRemain(i.fgRemainGame), Re.getInst().getSpinPanel().updateFeatureWinAmount(i.resumeFeatureWin), n.AppState.pushState(n.AppState.State.MiniGame), Ts.isEnable = !1; const t = n.Localization.getText("MSG_FREESPIN_POPUP", i.freeGame.spins), e = n.Localization.getText("MSG_FREESPIN_POPUP_START", i.freeGame.spins); Gs.getConfirmPopup().open(t, e, (() => { s.getInst().playMusic("FREEGAME_MUSIC"), this.onGameResume(!0) })), this.Dw.state.setAnimation(1, "fg", !0) } else this.onGameResume(!1), this.Dw.state.setAnimation(1, "mg", !0) } } Re.getInst().activeSpinPanel(), Re.getInst().showHint(), i.zW.emit(i.qM.ON_COMEIN_ANIM_STARTED) } onGameResume(t = !1, n = !1) { return pe(this, null, (function*() { var s, e; i.zW.emit(i.qM.SPIN_START), Re.getInst().switchSpinButtonToSpinStarted(t); const r = I.kc.getInst().gameInfo; if (r) { let h = []; if (this.xw = !1, r.resumeLastMegaSymbol) { const t = oe.createMegaMatrixResume(r.resumeLastMegaSymbol, M.GameBoard.GAME_TABLE_RESUME_FORMAT); h = oe.getMegaMatrix(t.megaSymbol, [], M.GameBoard.GAME_TABLE_FORMAT) } else h = oe.getMegaMatrix(M.DefaultMegaMatrix[0].megaSymbol, [], M.GameBoard.GAME_TABLE_FORMAT); if (r.freeGame) { if (this.xw = !0, this.up = null != (e = null == (s = r.freeGame.respinGame) ? void 0 : s.multiplier) ? e : 1, r.resumeLastMegaSymbol) { const t = oe.createMegaMatrixResume(r.resumeLastMegaSymbol, M.GameBoard.GAME_TABLE_RESUME_FORMAT); h = oe.getMegaMatrix(t.megaSymbol, [], M.GameBoard.GAME_TABLE_FORMAT) } i.zW.emit(i.qM.DEACTIVE_FREE_GAMES), M.RuntimeData.currentFGWin = void 0 !== r.freeGame.fgAccumTotalWin ? r.freeGame.fgAccumTotalWin : 0, this.kw = M.RuntimeData.currentFGWin, yield Re.getInst().presetSpinButtonForFreeMinigame(r.fgRemainGame), i.zW.emit(i.qM.ACTIVE_FREE_MINIGAMES, r.fgRemainGame) } else r.respinGame && (this.kw = void 0 === r.respinGame.accmWin ? 0 : r.respinGame.accmWin, this.up = r.respinGame.multiplier, this.Fw.updateMultiply(this.up, !0)); yield this.onSpinEnded(h, n, !0), n && (this.startSpin(t), Re.getInst().showNetworkLoading()) } else n && (this.startSpin(), Re.getInst().showNetworkLoading()) })) } onSpinEnded(t, n = !1, e = !1) { return pe(this, null, (function*() { var r, h, o, u, a, l, c; this.Bw.forceIdleScatter(); const f = e ? I.kc.getInst().gameInfo : I.kc.getInst().spinInfo, v = (null == (r = f.nextSymbol) ? void 0 : r.length) > 0 || (null == (o = null == (h = f.respinGame) ? void 0 : h.nextSymbol) ? void 0 : o.length) > 0 || (null == (l = null == (a = null == (u = f.freeGame) ? void 0 : u.respinGame) ? void 0 : a.nextSymbol) ? void 0 : l.length) > 0; if (yield this.$w(t), v) { if (this.up = f.wayWins ? f.wayWins[0].mul : null, i.zW.emit(i.qM.COMBINATION_ANIMATED, 0), f.totalWin > 0) { const t = this.Cm || this.Pw || Re.getInst().isAutoSpining(), n = f.totalWin, s = f.balance; this.Fw.playAnimNormalWin(f.freeGame, n), this.Xw.playMulAnim(f), Re.getInst().updateWinAmount(n, t, f.wayWins[0].mul), i.b2.setTimeout(1e3, (() => { this.Fw.activeWinCombine() })), i.b2.setTimeout(1150, (() => { Re.getInst().updateBalance(s), this.xw && (this.Cw = !0, i.b2.setTimeout(1e3, (() => { var t; Re.getInst().getSpinPanel().updateFeatureWinAmount(null == (t = f.featureResults) ? void 0 : t.accmWin) }))) })) } yield this.Yw(t, f, this.up) } else if (I.kc.getInst().jackpotPoolsUpdateInfo) { const t = I.kc.getInst().jackpotPoolsUpdateInfo; t && 1 === t.notificationMessageId && (s.getInst().minimizeBgm(.3, 1e3), s.getInst().restoreBgm(1e3)), I.kc.getInst().jackpotPoolsUpdateInfo = null } else this.xw || (this.stopPlayIdleSound(), this.playerIdleSound()), f.totalWin <= 0 && Re.getInst().updateBalance(f.balance); f.freeGame || 0 !== f.fgRemainGame || f.respinGame && 0 !== (null == (c = f.respinGame) ? void 0 : c.respinReq) || (this.up = 1), f.freeGame && f.freeGame.fgAccumTotalWin && f.freeGame.fgAccumTotalWin > 0 && (M.RuntimeData.last_fgAccumTotalWin = f.freeGame.fgAccumTotalWin), n ? setTimeout((() => Promise.resolve()), 300) : this.onEmitNextSpin(f, e) })) } isSpinStopped() { return this.Lw } onEmitNextSpin(t, e) { return pe(this, null, (function*() { var r, h, o, u, a, l, c, f, v, d; if (0 === (null == (h = null == (r = t.featureResults) ? void 0 : r.multiplierList) ? void 0 : h.win) && (yield this.checkBigWin(Re.getInst().getSpinPanel().getLastWinAmount())), this.Lw = !t.fgRemainGame && !t.respinGame, (null == (o = t.respinGame) ? void 0 : o.respinReq) || (null == (a = null == (u = t.freeGame) ? void 0 : u.respinGame) ? void 0 : a.respinReq) ? (i.zW.emit(i.qM.DEACTIVE_FREE_GAMES), i.zW.emit(i.qM.ACTIVE_FREE_GAMES, 1)) : i.zW.emit(i.qM.DEACTIVE_FREE_GAMES), t.bsList && !e) this.Bw.useCacheAsBitmap(!0), yield this.Gw.playToBonusGame(); else if (!t.freeGame || e || this.xw) { if (this.xw) if (this.Lw) { const t = I.kc.getInst().gameInfo.resumeDomination, s = I.kc.getInst().gameInfo.setting.domination.includes(t); !t || s || this.isDenomHadUpdated || (I.kc.getInst().resetDenominationToDefault(), Re.getInst().updateBetAmount(), this.isDenomHadUpdated = !0), this.Dw.state.setAnimation(1, "mg", !0), yield this.Fw.playAnimOutFG(), i.zW.emit(i.qM.DEACTIVE_FREE_MINIGAMES), Re.getInst().updateWinAmount(0), this.getNormalGameSpine().resetCombo(); const e = M.RuntimeData.last_fgAccumTotalWin > 0 ? M.RuntimeData.last_fgAccumTotalWin : M.RuntimeData.currentFGWin; yield this.showTotalWin(e, this.Uw), this.xw = !1, Re.getInst().getSpinPanel().setShowFreeGameUI(!1), this.Fw.setShowFreegame(!1), this.Xw.playDefaultMul(), this.Xw.updateUIFreegame(!1), n.AppState.popState(), this.stopPlayIdleSound(), this.playerIdleSound() } else { t.totalWin <= 0 && this.getNormalGameSpine().resetCombo(), this.Uw = void 0 !== t.freeGame ? t.freeGame.fgTotalGain : this.Uw; const n = Re.getInst().getSpinPanel().getSpinButton().getNumFreeSpinRemain(); t.fgRemainGame > n && (yield this.Hw.showRetrigger(t.fgRemainGame - n), Re.getInst().getSpinPanel().updateFreegameRemain(t.fgRemainGame), yield Re.getInst().presetSpinButtonForFreeMinigame(t.fgRemainGame), yield i.cQ.delay(300)) } } else this.stopPlayIdleSound(), this.up = null == (c = null == (l = t.featureResults) ? void 0 : l.multiplierList) ? void 0 : c.multiplier, s.getInst().stop("NORMAL_MUSIC"), s.getInst().playSfx("SFX_FG_TRIGGER_ALARM"), yield this.Bw.playSpecialSymbolActivation(M.SymbolType.SymbolScatter), this.Xw.playDefaultMul(), this.Dw.state.setAnimation(1, "fg", !0), yield this.Hw.showEnterFreeGame(t.fgRemainGame), this.xw = !0, i.zW.emit(i.qM.DEACTIVE_FREE_GAMES), Re.getInst().getSpinPanel().setShowFreeGameUI(!0), Re.getInst().getSpinPanel().updateFreegameRemain(t.fgRemainGame), Re.getInst().getSpinPanel().updateFeatureWinAmount(0), yield Re.getInst().presetSpinButtonForFreeMinigame(t.fgRemainGame), this.getNormalGameSpine().resetCombo(), i.zW.emit(i.qM.ACTIVE_FREE_MINIGAMES, t.fgRemainGame); if (0 === t.fgRemainGame && (!t.respinGame || t.respinGame), this.Lw && this.kw > 0) { const t = M.RuntimeData.last_fgAccumTotalWin > 0 ? M.RuntimeData.last_fgAccumTotalWin : M.RuntimeData.currentFGWin, n = t > this.kw ? t : this.kw; Re.getInst().updateShowPayline({}, n, !0); const s = Re.getInst().isAutoSpining(); n > M.Control.PAYLINE_TOTALWIN_COUNT_CONDITION * I.kc.getInst().totalBet && !s && (yield i.cQ.delay(M.Control.PAYLINE_TOTALWIN_COUNT_TIME)), this.kw = 0 } else t.totalWin > 0 && (this.kw += t.totalWin); const _ = I.kc.getInst().spinInfo; let p = !1; _ && (p = !(null == (f = _.respinGame) ? void 0 : f.nextSymbol) && 1 === (null == (d = null == (v = _.featureResults) ? void 0 : v.multiplierList) ? void 0 : d.multiplier)), i.zW.emit(i.qM.SPIN_STOP, this.Lw, p) })) } getNormalGameSpine() { return this.Xw } checkBigWin(t, n = !1) { return pe(this, null, (function*() { !n && t >= M.Popup.BIGWIN_MILESTONES[0][0] * I.kc.getInst().totalBet && (s.getInst().minimizeBgm(.1, 500), yield this.zw(t), yield i.cQ.delay(1200), i.b2.setTimeout(2e3, (() => { s.getInst().restoreBgm(2e3), this.xw || (this.stopPlayIdleSound(), this.playerIdleSound()) }))) })) } onSpinDataReceived(t) { return pe(this, null, (function*() { Re.getInst().showNetworkLoading(!1), this.Bw.onSpinDataReceived(t) })) } $w(t) { let i = 120; oe.checkReelNearWinActive(t) && (i = 450, Re.getInst().hideHintNearWin()), setTimeout((() => Promise.resolve()), i) } Yw(t, i, n = 1) { return pe(this, null, (function*() { const s = this.Bw.getSpinMode() === Qs.TURBO || this.Bw.getSpinMode() === Qs.FAST_TO_RESULT; return this.Bw.runWinValidation(t, i, this.Fw.updateMultiply.bind(this.Fw, n, s), n) })) } zw(t) { this.stopPlayIdleSound(); const i = s.getInst().getBgmId(); return this.Kw(!0), Gs.getInst().bigwinPopup.open(t, (() => { this.Kw(!1), s.getInst().enableMusic(), s.getInst().isPlaying(i, !0) || "FREEGAME_MUSIC" === i || s.getInst().playMusic(i, "BGM", 0), s.getInst().fade(i, 0, "AUTO", 500, !1) }), 0) } Kw(t) {} startSpin(t = !1, n = !1) { this.xw ? (this.Dw.state.setAnimation(2, "fg_spin", !1), this.stopPlayIdleSound()) : (this.Dw.state.setAnimation(2, "mg_spin", !1), this.stopPlayIdleSound()); const e = I.kc.getInst().spinInfo; if (t || !e || e.fgRemainGame || this.Fw.updateMultiply(M.Control.DEFAULT_START_MULTIPLER_NORMAL, !0), t) { let t = [], i = null == e ? void 0 : e.megaSymbol, n = null == e ? void 0 : e.megaHSymbol; if (!e) { const t = I.kc.getInst().gameInfo, s = oe.createMegaMatrixResume(t.resumeLastMegaSymbol, M.GameBoard.GAME_TABLE_RESUME_FORMAT); i = s.megaSymbol, n = s.megaHSymbol } t = oe.getMegaMatrix(i, [], M.GameBoard.GAME_TABLE_FORMAT) } else; if (this.Lw && (this.Lw = !1, M.RuntimeData.currentFGWin = 0, M.RuntimeData.last_fgAccumTotalWin = 0, Re.getInst().resetPaylineBarLevel()), xe.getInst().skipScoreAnimShow(), this.setFTRMode(!1), t) { this.Bw.startCascadeSpin(); const t = e || I.kc.getInst().gameInfo; i.b2.setTimeout(400, (() => { this.Fw.playAnimNoWin(), i.b2.setTimeout(500, (() => { this.Xw.playUpMul(t); const n = this.up + (t.freeGame ? M.Control.STEP_UP_MULTIPLER_FREEGAME : M.Control.STEP_UP_MULTIPLER_NORMAL); this.Fw.updateMultiply(n, !0); i.cQ.clamp(Math.floor((n - 1) / (t.freeGame ? M.Control.STEP_UP_MULTIPLER_FREEGAME : M.Control.STEP_UP_MULTIPLER_NORMAL)), 1, 5) })) })) } else { if (this.Cw && this.xw) { const t = 2500; this.Bw.forceSetNormalSpinTime(t), this.Bw.enableBlurSpinningAtReelIndex(2, !1), i.b2.setTimeout(t, (() => { this.Bw.resetNormalSpinTime(), this.Bw.enableBlurSpinningAtReelIndex(2, !0) })), this.Vw.state.setAnimation(0, "phoenix", !1), s.getInst().playSfx("PHOENIX_FLY"), i.b2.setTimeout(1400, (() => { s.getInst().playSfx("SFX_PHOENIX_PUZZLE") })), this.Vw.state.data.setMix("phoenix_in", "phoenix_loop", .5), this.Vw.state.data.setMix("phoenix_loop", "off", .5), this.Vw.state.setAnimation(1, "phoenix_in", !1), this.Vw.state.addAnimation(1, "phoenix_loop", !0, 0), this.Bw.stopSpin && i.b2.setTimeout(2500, (() => { this.Vw.state.setAnimation(1, "off", !1), s.getInst().stop("SFX_FG_WIN_ROLLUP_LOOP") })), this.Cw = !1 } this.qw(), this.setFTRMode(!1), Re.getInst().updateLostBalance(), Re.getInst().getPaylineInfo().fadeOutWinText(); const t = this.Cm; this.Xw.playDefaultMul(), this.Bw.startNormalSpin(t ? Qs.TURBO : Qs.NORMAL) } } shakeScreen(t) { const n = ge.getInst().getGameBoard().getSlotMachine(), s = n.x, e = n.y, r = new i.x_(1e3, 10); let h = Date.now(); const o = setInterval((() => { const t = Date.now() - h; if (t < 1e3) { const i = 40 * r.getAmplitude(t), h = 40 * r.getAmplitude(1.5 * t); n.x = s + i, n.y = e + h } else clearInterval(o), n.x = s, n.y = e }), 16) } playerIdleSound() { if (this.countSound = this.countSound >= this.idleSoundArr.length ? 0 : this.countSound, this.countSound < this.idleSoundArr.length) { this.timeoutId = setTimeout((() => { if (document.hidden) this.stopPlayIdleSound(), this.playerIdleSound(); else { const t = this.idleSoundArr[this.countSound].sound; s.getInst().playSfx(t), this.countSound++, this.stopPlayIdleSound(), this.playerIdleSound() } }), 1e3 * this.idleSoundArr[this.countSound].delay) } } stopPlayIdleSound() { clearTimeout(this.timeoutId) } qw() { Re.getInst().updateWinAmount(0) } forceStopSpin() { this.Bw.setFTRMode(!0), this.Bw.forceStop(), this.setFTRMode(!0) } setFTRMode(t) { this.Pw = t, this.Bw.setFTRMode(t) } update(t) { super.update(t), this.Bw.update(t), this.Fw.updateBackground(t), this.Hw && this.Hw.update(t) } onPause() { this.Bw && this.Bw.onPause() } onResume() { this.Bw && this.Bw.onResume() } entertoFreegame(t) { return pe(this, null, (function*() { var n, s; this.stopPlayIdleSound(), this.up = null == (s = null == (n = t.featureResults) ? void 0 : n.multiplierList) ? void 0 : s.multiplier, yield this.Hw.showEnterFreeGame(t.fgRemainGame), this.Fw.updateMultiply(M.Control.DEFAULT_START_MULTIPLER_FREEGAME, !0), this.xw = !0, this.Cw = !0, this.Xw.playDefaultMul(), this.Dw.state.setAnimation(1, "fg", !0), i.zW.emit(i.qM.DEACTIVE_FREE_GAMES), Re.getInst().getSpinPanel().updateFeatureWinAmount(0), yield Re.getInst().presetSpinButtonForFreeMinigame(t.fgRemainGame), i.zW.emit(i.qM.ACTIVE_FREE_MINIGAMES, t.fgRemainGame), i.zW.emit(i.qM.SPIN_STOP, this.Lw), Ts.isEnable = !1 })) } showTotalWin(t, i) { return this.stopPlayIdleSound(), this.Bw.useCacheAsBitmap(!1), this.Hw.showTotalWin(t, i) } setTurboMode(t) { this.Cm = t, this.Bw.setTurboMode(t) } isTurboModeEnabled() { return this.Cm } isFTRMode() { return this.Pw } getSlotMachine() { return this.Bw } getBoardBackground() { return this.Fw } } var be = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); const we = class extends n.GameSceneBase { constructor() { super(), this.Zw = null, this.Jw = !1, this.Qw = !1, this.tg = 0, this.ig = -1 } static getInst() { return we.vu || (we.vu = new we, n.GameSceneBase.gameScene = we.vu), we.vu } load(t) { this.ng().then((() => { this.Jw = !0, t && t() })) } active(t) { this.Jw ? this.sg(t) : (this.load((() => { this.sg(t) })), this.eg()), n.AppState.pushState(n.AppState.State.MainGame), s.getInst().playMusic("NORMAL_MUSIC", "BGM", 0, ((t, i, n, s, e) => { t.fade(i, 0, "AUTO", M.Control.FADEIN_MAIN_GAME_MUSIC, !1) })) } sg(t) { t || this.Zw.onActive(), n.MultiResolutionHandler.getInst().onResize(), Re.getInst().popupContainer.sortChildren(), Bs.getInst().registerEvent(Bs.CLIENT_STATE_UPDATED_EVENT, this.rg.bind(this)), Bs.getInst().registerEvent(Bs.CLIENT_STATE_BUY_FEATURE_EVENT, this.hg.bind(this)), Bs.getInst().registerEvent(Bs.CLIENT_STATE_BUY_FREEGAME_EVENT, this.og.bind(this)), this.Qw = !0 } deactive() { Re.getInst().deactiveSpinPanel(), this.Qw = !1, n.AppState.clearStates() } isActive() { return this.Qw } onPause() { this.Zw && this.Zw.onPause() } onResume() { this.Zw && this.Zw.onResume() } update(t) {} ng() { return be(this, null, (function*() { return new Promise((t => { this.Zw = new me, this.Zw.initBoard(), this.container.addChild(this.Zw), this.Zw.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, n.AppConfig.BASE_SCREEN_HEIGHT / 2), t() })) })) } onWSReconnect(t) { i.zW.emit(i.ip.ON_WS_CONNECTED, !1); const s = n.Localization.getText("MSG_SOCKET_ERROR"); Gs.getInst().networkRetryNotification.open(`${s}`, 2e3), 10 === t && Gs.getInst().networkWaitingPopup.open("", n.Localization.getText("RES_12999"), (() => { location.reload() })) } onWSConnected() { i.zW.emit(i.ip.ON_WS_CONNECTED, !0), Gs.getInst().networkWaitingPopup.isOpenning() && Gs.getInst().networkWaitingPopup.close() } updateReelWay(t) { this.getGameBoard().getNormalGameSpine().updateReelWay(t) } updateMaxWay(t, i) {} updateTnumValue() { Re.getInst().getSpinPanel().updateTnumValue() } showHintNearWin() { Re.getInst().showHintNearWin() } rg(t) { this.Zw.onSpinDataReceived(t), I.kc.getInst().spinInfo = t, i.zW.emit(i.qM.RECEIVED_SPIN_DATA) } hg(t) {} og(t) { i.b2.setTimeout(800, (() => { Gs.getInst().buyFeaturePopup.callSuccessEnterFG(), i.b2.setTimeout(400, (() => { this.Zw.entertoFreegame(t) })) })) } startSpin(t, n = !1) { return be(this, null, (function*() { this.Zw.startSpin(t, n), i.zW.emit(i.qM.SPIN_START, t), Bs.getInst().requestSpin() })) } ug() { 0 === this.tg ? this.tg = i.cQ.randomRange(0, 1, !0) : this.ig++ } ag() { i.b2.setTimeout(this.ig > -1 ? M.SlotStyle.SYMBOL_SPIN_TIME_CASCADE : M.SlotStyle.SYMBOL_SPIN_TIME_NORMAL, (() => { let t = null; this.ig > -1 && this.ig < ks.MockFreeGameData.length ? (t = ks.MockFreeGameData[this.ig], this.ig === ks.MockFreeGameData.length - 1 && (this.ig = -1, this.tg = 0)) : t = ks.MockSpinDatas[this.tg], this.rg(t) })) } resumeSpin(t) { this.Zw.onGameResume(t, !0) } forceStopSpin() { this.Zw.forceStopSpin() } forceSetModeFTR() { this.Zw.setFTRMode(!0) } eg() { let t = i.cQ.getGameSetting("sound"); if ("" !== t) { const i = Number(t) > 0; Re.getInst().updateSoundSetting(!i), s.getInst().setSoundOption(i) } else t = "1", Re.getInst().updateSoundSetting(!1), s.getInst().setSoundOption(!0), i.cQ.updateGameSetting("sound", t, 30) } loadBetSetting() {} turboModeOption(t) { this.Zw.setTurboMode(t) } isTurboModeEnabled() { return this.Zw.isTurboModeEnabled() } getGameBoard() { return this.Zw } }; let ge = we; ge.vu = null; const ye = class { constructor() { this.container = null, this.cg = null, this.fg = 0, this.vg = !1, this.dg = !1, this._g = !1, this.pg = !1, this.bg = !1, this.wg = -1, this.gg = -1, this.yg = 0, this.Eg = 0, this.Sg = 0, this.Ag = !1, this.Tg = !1, this.Mg = null, this.Og = null, this.pv = null, this.init() } init() { this.container = new u.W2, this.Og = new E.PY(n.ResourceManager.getSpine("spin_button-skeleton")), this.Og.position.set(0, -32), this.Og.state.timeScale = 1, this.container.addChild(this.Og), this.Ig(), this.Og.state.setAnimation(0, "logo", !0), this.Og.state.setAnimation(2, "spin", !0), this.Og.state.timeScale = ye.DEFAULT_BUTTON_SPEED, this.setSpinButtonInteractive(!0), this.Og.hitArea = new r.Cd(0, 0, 90); this.cg = new p.Xz("", { fontName: M.Font.FONT_REMAIN, fontSize: 10, align: "left" }), this.cg.anchor.set(.5), this.cg.position.set(2, -45), this.cg.visible = !1, this.container.addChild(this.cg), this.Og.buttonMode = !0, this.Og.addListener("pointerup", (() => { this.wg > -1 ? this.onEndAutoSpin() : this.Og.interactive && this.onPressed() })); const t = t => { t && 0 === this.fg ? this.Og.state.setAnimation(3, "hover", !0) : this.Og.state.setAnimation(3, "normal", !1) }; this.Og.addListener("mouseover", (() => { t(!0) })), this.Og.addListener("mouseout", (() => { t(!1) })), this.Og.addListener("pointerupoutside", (() => { t(!1) })), this.Og.addListener("touchstart", (() => { t(!0) })), this.Og.addListener("touchend", (() => { t(!1) })), this.Og.addListener("touchendoutside", (() => { t(!1) })), i.zW.on(i.qM.RECEIVED_SPIN_DATA, this.onReceivedSpinData.bind(this)), i.zW.on(i.qM.ERROR_PUSHED_CODE, this.onErrorPushEvent.bind(this)), i.zW.on(i.qM.SPIN_STOP, this.onSpin.bind(this)), i.zW.on(i.qM.COMBINATION_ANIMATED, this.onCombinationAnimated.bind(this)), i.zW.on(i.qM.ACTIVE_FREE_GAMES, this.onActiveFreeGame.bind(this)), i.zW.on(i.qM.DEACTIVE_FREE_GAMES, this.onDeactiveFreeGame.bind(this)), i.zW.on(i.qM.ACTIVE_BONUS_GAMES, this.onActiveBonusGame.bind(this)), i.zW.on(i.qM.DEACTIVE_BONUS_GAMES, this.onDeactiveBonusGame.bind(this)), i.zW.on(i.qM.ACTIVE_NEAR_WIN, this.onActiveNearWin.bind(this)), i.zW.on(i.qM.ACTIVE_AUTO_SPIN, this.onActiveAutoSpin.bind(this)), i.zW.on(i.qM.DEACTIVE_AUTO_SPIN, this.onEndAutoSpin.bind(this)), i.zW.on(i.qM.LOCK_SPIN_ACTION, this.onLockSpinAction.bind(this)), i.zW.on(i.qM.ACTIVE_FREE_MINIGAMES, this.onActiveFreeMinigame.bind(this)), i.zW.on(i.qM.UPDATE_FREE_MINIGAMES, this.onActiveFreeMinigame.bind(this)), i.zW.on(i.qM.DEACTIVE_FREE_MINIGAMES, this.onDeactiveFreeMinigame.bind(this)), this.pv = new i.N1, this.pv.addKey("Space", this.onKeyDown.bind(this)), this.Mg = new m.xv(""), this.Mg.x = -350, this.Mg.y = -350, this.Mg.visible = !1, this.container.addChild(this.Mg) } Ig() { const t = (t, i, n = .25) => { this.Og && this.Og.state.hasAnimation(t) && this.Og.state.hasAnimation(i) && this.Og.stateData.setMix(t, i, n) }; t("run", "win", .25), t("run", "autospin", .25), t("win", "run", .25), t("win", "autospin", .25), t("autospin", "run", .25), t("autospin", "win", .25), t("logo", "run", .25), t("run", "logo", .25), t("on", "off", .25), t("off", "on", .25), t("logo", "autospin", .25), t("normal", "hover", .25), t("hover", "press", .25), t("press", "hover", .25), t("press", "normal", .25) } update(t) { switch (this.fg) { case 0: this.Og.state.addAnimation(3, "normal", !0, 0); break; case 2: case 1: if (this.dg || this._g) break; case 5: this.rotateButtonSpin(M.Control.SPIN_BUTTON_ROTATE_SPEED * t) } this.Eg > 0 && (this.Eg -= 1e3 * t, this.Eg <= 0 && (this.dg || this._g || this.setupAutoSpin())) } onKeyDown(t) { if ("Space" === t.code) n.AppState.curState() !== n.AppState.State.MainGame || this.Tg || (!this.vg && this.Og.interactive ? this.onPressed() : this.vg && this.onEndAutoSpin()) } onPressed() { if (!this.Ag) { if (10 === this.Sg && !this.vg) return this.Sg++, void Gs.getInst().questionPopup.open(n.Localization.getText("TURBO_HINT"), n.Localization.getText("TURBO_HINT_ENABLE"), n.Localization.getText("TURBO_HINT_LATER"), (() => { i.zW.emit(i.qM.UPDATE_TURBO_TOGGLE, !0), this.onPressed() }), (() => { this.onPressed() })); if (0 === this.fg) { if (this.gg <= 0 && !this.dg && I.kc.getInst().balance < I.kc.getInst().totalBet) return Gs.getConfirmPopup().open(n.Localization.getText("RES_11101"), n.Localization.getText("CONFIRM"), null), this.bg = !1, void(this.vg && (this.onDeactiveAutoSpin(), Re.getInst().setAutoSpinActive(!1), i.zW.emit(i.qM.SPIN_STOP, !0), this.fg = 0, this.enableButtonSpin())); if (this.dg || this.disableButtonSpin(), this.dg || ge.getInst().isTurboModeEnabled() || !this.pg ? this.dg && !ge.getInst().isTurboModeEnabled() && this.setSpinButtonInteractive(!1) : this.setSpinButtonInteractive(!0), !this.dg && !this.pg) { this.vg || this.Og.state.setAnimation(0, "run", !0), this.Og.state.setAnimation(3, "press", !1), this.Og.state.setAnimation(4, "press_fx", !1), this.Og.state.addAnimation(4, "press_off", !1, 0), this.Og.state.addAnimation(3, "normal", !1, 0), this.Og.state.timeScale = ge.getInst().isTurboModeEnabled() ? 3 : 1; const t = i.cQ.getAnimDurationMS(this.Og, "press") / this.Og.state.timeScale; i.b2.setTimeout(.75 * t, (() => { i.kX.to(ge.getInst().isTurboModeEnabled() ? 100 : 200, this.Og.state, { timeScale: ye.SPIN_SPEED }) })) } this.dg || s.getInst().playSfx("SFX_REEL_SPIN"), ge.getInst().startSpin(this.dg, !(this.dg || this.pg)), this.fg = 1, this.bg = !0 } else 2 !== this.fg && 1 !== this.fg || (this.fg = 5, this.disableButtonSpin(), ge.getInst().forceStopSpin()) } } switchToSpinStarted(t) { this.fg = 1, this.bg = !0, this.dg = t, this.dg && (this.fg = 2, this.disableButtonSpin()) } onEnterGame(t) { this.setSpinButtonInteractive(!t) } setSpinButtonInteractive(t) { this.Og.interactive = t, this.Og.state.setAnimation(1, t ? "on" : "off", !1) } onEndAutoSpin(t = !1) { n.AppState.curState() !== n.AppState.State.MainGame && t || this.Tg || (this.vg && !this.pg && this.wg > 0 ? (this.onDeactiveAutoSpin(), Re.getInst().setAutoSpinActive(!1)) : this.pg && (1 === this.fg || 2 === this.fg ? this.onPressed() : ge.getInst().forceSetModeFTR())) } onErrorPushEvent(t) { this.Ng(), this.Ag = !0 } Ng() { this.vg && this.wg > 0 && (this.onDeactiveAutoSpin(), Re.getInst().setAutoSpinActive(!1)) } setNumAutoSpin(t) { this.wg = t } getNumFreeSpinRemain() { return this.gg } setPassTutorialTurbo() { this.Sg = 999 } onReceivedSpinData(t) { this.fg = 2, this.onReadyForFTR(t) } onReadyForFTR(t) { (!ge.getInst().isTurboModeEnabled() && !this.dg || !this.pg && t) && this.setSpinButtonInteractive(!0) } onSpin(t = !0, i = !1) { this.gg > 0 || this.wg > 0 ? (this.Eg = (i ? M.Control.AUTO_SPIN_ARRANGE_TIME_NO_COMBINE : M.Control.AUTO_SPIN_ARRANGE_TIME) + this.yg, this.yg = 0) : this.pg || this.dg || (this.vg && (this.vg = !1, Re.getInst().setAutoSpinActive(this.vg), this.onDeactiveAutoSpin()), this.bg = !1, this.fg = 0, this.enableButtonSpin()), this.checkEndSession() } checkEndSession() { const t = I.kc.getInst().spinInfo; t && t.isFinished && i.zW.emit(i.qM.SPIN_SESSION_END) } setupAutoSpin() { if (this.Eg = 0, 0 === this.wg && this.gg <= 0) return Re.getInst().setAutoSpinActive(this.vg), i.zW.emit(i.qM.SPIN_STOP, !0), this.bg = !1, this.fg = 0, void this.enableButtonSpin(); 0 != this.fg && (this.fg = 0), this.onPressed(); let t = ""; t = this.wg > 1e3 ? t = n.Localization.getText("BET_AMOUNT_LIST").split(",").pop() : `${this.wg}`, this.gg > 0 ? this.gg-- : this.wg > 1e3 ? t = t = n.Localization.getText("BET_AMOUNT_LIST").split(",").pop() : this.wg > 0 && (this.wg--, t = `${this.wg}`), this.cg.text = t, Re.getInst().getSpinPanel().updateFreegameRemain(this.gg) } onCombinationAnimated(t = 1e3) { this.yg = t, this.fg = 3, this.disableButtonSpin() } rotateButtonSpin(t) {} enableButtonSpin() { this.vg || this.dg || (i.kX.stopTweenFor(this.Og.state), this.setSpinButtonInteractive(!0), this.vg || (this.Og.state.timeScale = ye.DEFAULT_BUTTON_SPEED, this.Og.state.setAnimation(0, "logo", !0))) } disableButtonSpin() { -1 === this.wg && this.setSpinButtonInteractive(!1) } onActiveNearWin() { this.setSpinButtonInteractive(!1) } presetFreeMinigame(t) { this.cg.visible = !0, this.gg = t, this.cg.text = `${t}` } onUpdateFreeMinigame(t) { this.gg = t, this.cg.text = `${t}` } onLockSpinAction() {} onActiveFreeMinigame(t, i = !1) { this.fg = 4, this.Og.visible = !1, this.presetFreeMinigame(t), Re.getInst().setAutoSpinActive(this.vg), this.pg = !0 } onDeactiveFreeMinigame() { this.pg = !1, this.Og.visible = !0, this.wg > 0 ? this.yg = M.Control.AUTO_SPIN_DELAY_FREE_GAME_TIME : (this.onDeactiveAutoSpin(), Re.getInst().setAutoSpinActive(this.vg)) } onActiveFreeGame(t) { this.dg = !0, this.fg = 0, this.onPressed() } onDeactiveFreeGame() { this.dg = !1 } onActiveBonusGame() { this.fg = 0, this._g = !0 } onDeactiveBonusGame() { if (this._g = !1, this.wg > 0) return this.yg = M.Control.AUTO_SPIN_DELAY_FREE_GAME_TIME, void this.onSpin() } onDeactiveAutoSpin() { this.vg = !1, this.cg.visible = !1, this.wg = -1, i.zW.emit(i.qM.ON_STOP_AUTO_SPIN) } onActiveAutoSpin(t) { this.fg = 4, this.vg = !0, this.cg.visible = !0, this.wg = t; let i = `${t}`; Re.getInst().setAutoSpinActive(this.vg), this.wg > 1e3 && (i = n.Localization.getText("BET_AMOUNT_LIST").split(",").pop()), this.cg.text = i, this.Og.state.setAnimation(0, "autospin", !1), this.bg || (this.yg = 0, this.onSpin()) } isAutoSpin() { return this.vg } isSpinStarted() { return this.bg } isFreegameSpin() { return this.dg || this.pg } isFreeMiniGameSpin() { return this.pg } hideSpinNumber(t) { this.cg.visible = !t } checkDimSpinButton() { I.kc.getInst().balance < I.kc.getInst().totalBet ? this.Og.buttonMode = !1 : (this.setSpinButtonInteractive(!0), this.Og.buttonMode = !0) } }; let Ee = ye; Ee.SPIN_SPEED = 10, Ee.DEFAULT_BUTTON_SPEED = .75; var Se = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); class Ae { constructor() { this.container = null, this.Rg = "robotoregular", this.Pg = "#6B6D6E", this.xg = "#FFFFFF", this.Lg = "#FEF78C", this.Ug = 13971502, this.kg = 36, this.Fg = -80, this.Og = null, this.Bg = null, this.Dg = null, this.jg = null, this.Gg = null, this.Wg = null, this.Hg = null, this.Xg = null, this.Vg = null, this.$g = null, this.Yg = null, this.zg = 0, this.qg = null, this.Zg = !1, this.Jg = !1, this.Qg = !1, this.iy = null, this.Jl = 0, this.ny = !1, this.container = new u.W2, this.init() } init() { this.sy = new u.W2, this.sy.position.set(0, -124), this.container.addChild(this.sy), this.Hm = new u.W2, this.sy.addChild(this.Hm), this.ey = new u.W2, this.sy.addChild(this.ey), this.ey.visible = !1, this.hy = new u.W2, this.container.addChild(this.hy), this.oy = new u.W2, this.oy.position.set(0, -33), this.oy.renderable = !1, this.uy = new u.W2, this.Og = new Ee, this.uy.addChild(this.Og.container), this.uy.position.set(0, -34), this.container.addChild(this.uy), this.ly = new m.xv(n.Localization.getText("BET_MAX"), { fontFamily: this.Rg, fontSize: 25, fill: [16777215] }), this.ly.anchor.set(.5), this.vy = new c.j(n.ResourceManager.getAtlasFrame("ui_atlas", "tool_tip")), this.vy.anchor.set(.5), this._y = new c.j(n.ResourceManager.getAtlasFrame("spin_panel_atlas", "tool_tip_turbo_off")), this._y.anchor.set(0, .5), this._y.position.set(-this.vy.width / 2 + 16, 0), this._y.visible = !1, this.py = new u.W2, this.py.addChild(this.vy), this.py.addChild(this._y), this.py.addChild(this.ly), this.py.visible = !1, this.Bg = new Ms.ZD({ textureDefault: n.ResourceManager.getAtlasFrame("spin_panel_atlas", "fast_spin_button"), textureToggle: n.ResourceManager.getAtlasFrame("spin_panel_atlas", "fast_spin_yellow_button") }).on("click", ((t, i) => { this.Og.setPassTutorialTurbo(), ge.getInst().turboModeOption(i), globalThis.isTurbo = i, this._y.texture = n.ResourceManager.getAtlasFrame("spin_panel_atlas", i ? "tool_tip_turbo_on" : "tool_tip_turbo_off"), this.showNotify(n.Localization.getText(i ? "TURBO_ENABLE" : "TURBO_DISABLE"), !0), s.getInst().playSfx("SFX_BUTTON_CLICK") })), this.Bg.getContainer().position.set(-296, -84), this.Bg.getContainer().anchor.set(.5), this.hy.addChild(this.Bg.getContainer()), this.jg = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("spin_panel_atlas", "btn_plus")), offTexture: n.ResourceManager.getAtlasFrame("spin_panel_atlas", "btn_plus") }).on("click", (() => { I.kc.getInst().canIncreaseDenomination() && (I.kc.getInst().increaseDenomination(), this.updateBetAmount()), this.isMaxBet() && (this.jg.setInteractable(!1), this.showNotify(n.Localization.getText("BET_MAX"))), s.getInst().playSfx("SFX_BUTTON_CLICK") })), this.jg.getContainer().anchor.set(.5), this.jg.getContainer().position.set(165, -64), this.hy.addChild(this.jg.getContainer()), this.Dg = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("spin_panel_atlas", "btn_minus")), offTexture: n.ResourceManager.getAtlasFrame("spin_panel_atlas", "btn_minus") }).on("click", (() => { I.kc.getInst().canDecreaseDenomination() && (I.kc.getInst().decreaseDenomination(), this.updateBetAmount()), this.isMinBet() && (this.Dg.setInteractable(!1), this.showNotify(n.Localization.getText("BET_MIN"))), s.getInst().playSfx("SFX_BUTTON_CLICK") })), this.Dg.getContainer().anchor.set(.5), this.Dg.getContainer().position.set(-165, -64), this.hy.addChild(this.Dg.getContainer()), this.Vg = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("spin_panel_atlas", "autoplay")), offTexture: n.ResourceManager.getAtlasFrame("spin_panel_atlas", "autoplay") }).on("click", (() => { Gs.getInst().autoSpinMenuPopup.open(this.my.bind(this), !1), s.getInst().playSfx("SFX_BUTTON_CLICK") })), this.Vg.getContainer().position.set(296, -84), this.Vg.getContainer().anchor.set(.5), this.hy.addChild(this.Vg.getContainer()), this.wy = new u.W2, this.container.addChild(this.wy), this.wy.position.set(0, 2 * M.Menu.SPIN_PANEL_HEIGHT); let t = 0; const e = new URL(window.location.href), h = "enable" === e.searchParams.get("exitButton"), o = e.searchParams.get("returnURL"), a = h || o, l = this.kg, f = 1.8, d = .3, _ = a ? -245 : -220, b = a ? 120 : 135, w = new v.TC; w.beginFill(1710876, 1), w.drawRect(-n.AppConfig.BASE_SCREEN_WIDTH / 2, 62 - M.Menu.SPIN_PANEL_HEIGHT, n.AppConfig.BASE_SCREEN_WIDTH, 3 * M.Menu.SPIN_PANEL_HEIGHT - 97), w.endFill(), w.name = "optionBG", this.wy.addChild(w); const g = new m.xv(n.Localization.getText("TXT_SELECT_OPTIONS"), { fontFamily: this.Rg, fontSize: M.Menu.TITLE_FONT_SIZE, fill: [this.xg] }); if (g.anchor.set(.5), g.position.set(0, this.Fg), this.wy.addChild(g), a) { const i = new m.xv(n.Localization.getText("MENU_EXIT"), { fontFamily: this.Rg, fontSize: M.Menu.MENU_OPTION_TEXT_SIZE, fill: [this.Pg] }); i.anchor.set(.5), i.position.set(_ + t * b, l * f), this.wy.addChild(i); const e = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("menu_popup_atlas", "quit_button")) }).on("click", (() => { Gs.getInst().questionPopup.open(n.Localization.getText("TXT_QUIT_GAME_TEXT"), n.Localization.getText("TXT_YES"), n.Localization.getText("TXT_NO"), (() => { o ? location.replace(o) : setTimeout(window.close, 301) })), s.getInst().playSfx("SFX_BUTTON_CLICK") })); e.getContainer().anchor.set(.5), e.getContainer().position.set(_ + t * b, l * d), e.getContainer().hitArea = new r.Ae(-30, -30, 60, 60), this.wy.addChild(e.getContainer()), t++ } const y = new m.xv(n.Localization.getText("MENU_SOUND"), { fontFamily: this.Rg, fontSize: M.Menu.MENU_OPTION_TEXT_SIZE, fill: [this.Pg] }); y.anchor.set(.5), y.position.set(_ + t * b, l * f), this.wy.addChild(y), this.gy = new Ms.ZD({ textureDefault: n.ResourceManager.getAtlasFrame("menu_popup_atlas", "music_button"), textureToggle: n.ResourceManager.getAtlasFrame("menu_popup_atlas", "mute_button") }).on("click", ((t, n) => { s.getInst().setSoundOption(!n), i.cQ.updateGameSetting("sound", n ? "0" : "1", 30), s.getInst().playSfx("SFX_BUTTON_CLICK") })), this.gy.getContainer().anchor.set(.5), this.gy.getContainer().position.set(_ + t * b, l * d), this.gy.getContainer().hitArea = new r.Ae(-30, -30, 60, 60), this.wy.addChild(this.gy.getContainer()), t++; const E = new m.xv(n.Localization.getText("MENU_RULES"), { fontFamily: this.Rg, fontSize: M.Menu.MENU_OPTION_TEXT_SIZE, fill: [this.Pg] }); E.anchor.set(.5), E.position.set(_ + t * b, l * f), this.wy.addChild(E); const S = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("menu_popup_atlas", "help_button")) }).on("click", (() => { s.getInst().playSfx("SFX_BUTTON_CLICK") // O.Mw(document.getElementById("rules")) })); S.getContainer().anchor.set(.5), S.getContainer().position.set(_ + t * b, l * d), S.getContainer().hitArea = new r.Ae(-30, -30, 60, 60), this.wy.addChild(S.getContainer()), t++; const A = new m.xv(n.Localization.getText("MENU_HISTORY"), { fontFamily: this.Rg, fontSize: M.Menu.MENU_OPTION_TEXT_SIZE, fill: [this.Pg] }); A.anchor.set(.5), A.position.set(_ + t * b, l * f), this.wy.addChild(A); const T = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("menu_popup_atlas", "history_button")) }).on("click", (() => { // gs.e.open(), s.getInst().playSfx("SFX_BUTTON_CLICK") })); T.getContainer().anchor.set(.5), T.getContainer().position.set(_ + t * b, l * d), T.getContainer().hitArea = new r.Ae(-30, -30, 60, 60), this.wy.addChild(T.getContainer()); const N = n.ConfigManager.getInst().betHistory.demoBetHistory; !M.RuntimeData.isTestAcc || N || i.cQ.isDeveloper() || T.setInteractable(!1), t++; const R = new m.xv(n.Localization.getText("MENU_PAYTABLE"), { fontFamily: this.Rg, fontSize: M.Menu.MENU_OPTION_TEXT_SIZE, fill: [this.Pg] }); R.anchor.set(.5), R.position.set(_ + t * b, l * f), this.wy.addChild(R); const P = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("menu_popup_atlas", "paytable_button")) }).on("click", (() => { s.getInst().playSfx("SFX_BUTTON_CLICK"), bs(), O.Mw(document.getElementById("paytable")) })); P.getContainer().anchor.set(.5), P.getContainer().position.set(_ + t * b, l * d), P.getContainer().hitArea = new r.Ae(-30, -30, 60, 60), this.wy.addChild(P.getContainer()), t++; const x = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("menu_popup_atlas", "close_button")) }).on("click", (() => { this.yy(), this.Xg.getContainer().visible = !0, s.getInst().playSfx("SFX_BUTTON_CLICK") })); x.getContainer().anchor.set(.5), x.getContainer().position.set(_ + t * b + (a ? 10 : 30), l * d), x.getContainer().scale.set(1), x.getContainer().hitArea = new r.Ae(-30, -30, 60, 60), this.wy.addChild(x.getContainer()); const L = new u.W2; L.position.set(0, -n.AppConfig.BASE_SCREEN_HEIGHT); const C = new n.AutoAlignContainer("BOTTOM"); this.container.addChild(C), C.addChild(L); const U = new v.TC; U.beginFill(0, 1), U.drawRoundedRect(-80, 10, 160, 24, 10), U.endFill(), U.position.set(0, 60), L.addChild(U), this.Ey = new m.xv(this.Sy(new Date), { fontFamily: "Arial", fontSize: 15, fill: [this.xg], align: "left", fontWeight: "bold" }), this.Ey.position.set(-385, 14), U.addChild(this.Ey); const k = new c.j(n.ResourceManager.getAtlasFrame("spin_panel_atlas", "logo")); k.anchor.set(.5), k.position.set(305, 22), U.addChild(k); const F = new m.xv("VN: 202504250627", { fontFamily: "Arial", fontSize: 15, fontWeight: "bold", align: "center", fill: [this.xg] }); F.position.set(-227, 14), U.addChild(F); const B = new v.TC; B.beginFill(0, 1), B.drawRoundedRect(-50, -10, 100, 20, 10), B.endFill(), B.position.set(0, 170), this.Ay = new m.xv("", { fontFamily: "Arial", fontSize: 16, fill: [this.xg], align: "center", fontWeight: "bold" }), this.Ay.anchor.set(.5, 0), this.Ay.position.y = 13, U.addChild(this.Ay), this.Xg = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("spin_panel_atlas", "menu_button")), offTexture: n.ResourceManager.getAtlasFrame("spin_panel_atlas", "menu_button") }).on("click", (() => { this.Ty(), this.Xg.getContainer().visible = !1, s.getInst().playSfx("SFX_BUTTON_CLICK") })), this.Xg.getContainer().position.set(350, 25), this.Xg.getContainer().anchor.set(.5), this.Xg.getContainer().hitArea = new r.Ae(-35, -35, 70, 70), this.container.addChild(this.Xg.getContainer()); const D = -80, j = new c.j(n.ResourceManager.getAtlasFrame("spin_panel_atlas", "bet_bar")); j.anchor.set(0, .5), j.position.set(118, -88); const G = new c.j(n.ResourceManager.getAtlasFrame("spin_panel_atlas", "bet")); G.anchor.set(0, .7), G.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 3 - 125, D), this.sy.addChild(G), this.Hg = new m.xv(i.JK.currencyFormatAmount(0, !0), { fontFamily: this.Rg, fontSize: 40, fill: [this.xg], align: "right", textBaseline: "bottom" }), this.Hg.anchor.set(1, .5), this.Hg.position.set(375, -76), this.sy.addChild(this.Hg), this.Wg = new m.xv(i.JK.getCurrencyText(), { fontFamily: this.Rg, fontSize: Math.floor(.75 * this.Hg.style.fontSize), fill: [this.xg], align: "right", textBaseline: "bottom", padding: 4 }), this.Wg.anchor.set(1, .5), this.Wg.position.set(-this.Hg.width, 0), n.ConfigManager.getInst().hideGameCurrency || this.Hg.addChild(this.Wg), this.Hg.interactive = !0, this.Hg.hitArea = new r.Ae(-200, -35, 200, 40), this.Hg.addListener("pointerup", (() => { this.My() })); const W = new c.j(n.ResourceManager.getAtlasFrame("spin_panel_atlas", "balance_bar")); W.anchor.set(0, .5), W.position.set(-400, -88); const H = new c.j(n.ResourceManager.getAtlasFrame("spin_panel_atlas", "balance")); H.anchor.set(0, .5), H.position.set(-n.AppConfig.BASE_SCREEN_WIDTH / 3 - 116, -87), this.sy.addChild(H); const X = new m.xv(i.JK.currencyFormatAmount(0, !0), { fontFamily: this.Rg, fontSize: 40, fill: [this.xg], align: "right", textBaseline: "bottom" }); X.anchor.set(1, .5), this.Yg = new Ms.YH(X), this.Yg.position.set(90, -76), this.sy.addChild(this.Yg), this.Yg.interactive = !0, this.Yg.hitArea = new r.Ae(-400, -35, 400, 40), this.Yg.addListener("pointerup", (() => { this.My() })), this.$g = new m.xv(i.JK.getCurrencyText(), { fontFamily: this.Rg, fontSize: Math.floor(.75 * X.style.fontSize), fill: [this.xg], align: "right", textBaseline: "bottom", padding: 4 }), this.$g.anchor.set(1, .5), this.$g.position.set(-this.Yg.width, 0), n.ConfigManager.getInst().hideGameCurrency || this.Yg.addChild(this.$g), this.updateBetAmount(); this.qg = new p.Xz(i.JK.currencyFormatAmount(0), { fontName: M.Font.FONT_TOTAL_WIN, fontSize: M.Menu.MENU_NORMAL_TXT_FONT_SIZE, align: "center" }), this.qg.anchor.set(.5), this.qg.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 3, -80), this.qg.interactive = !0, this.qg.hitArea = new r.Ae(-150, -35, 300, 40), this.qg.addListener("pointerup", (() => { this.My() })), this.Oy = new c.j(n.ResourceManager.getAtlasFrame("UI_multilanguage", "remaining_free_spin")), this.Oy.anchor.set(.5), this.Oy.position.set(-75, 70), this.ey.addChild(this.Oy), this.Iy = new c.j(n.ResourceManager.getAtlasFrame("UI_multilanguage", "last_free_spin")), this.Iy.anchor.set(.5), this.Iy.position.set(0, 60), this.Iy.visible = !1, this.ey.addChild(this.Iy), this.iy = new p.Xz("10", { fontName: M.Font.FONT_REMAIN, fontSize: 25, align: "center" }), this.iy.anchor.set(.5, .5), this.iy.position.set(240, 45), this.ey.addChild(this.iy), i.zW.on(i.qM.LOCK_SPIN_PANE, (() => { this.Ny(!1), this.Og.disableButtonSpin() })), i.zW.on(i.qM.ACTIVE_FREE_GAMES, (() => { this.Ny(!1), this.Zg = !0 })), i.zW.on(i.qM.DEACTIVE_FREE_GAMES, (() => { this.Zg = !1 })), i.zW.on(i.qM.SPIN_STOP, this.onSpinStopped.bind(this)), i.zW.on(i.qM.SPIN_START, this.onSpinStarted.bind(this)), i.zW.on(i.qM.ACTIVE_AUTO_SPIN, this.onAutoSpin.bind(this)), i.zW.on(i.qM.UPDATE_TURBO_TOGGLE, this.my.bind(this)), i.zW.on(i.qM.ACTIVE_FREE_MINIGAMES, (() => { this.Ny(!1), this.Jg = !0 })), i.zW.on(i.qM.DEACTIVE_FREE_MINIGAMES, (() => { this.Jg = !1, this.Ry(!1) })), this.container.alpha = 0, this.Og.setSpinButtonInteractive(!1), this.setInteractivePanel(!1), this.Qg = i.JK.isDiplayFormatCredit } onActive() { i.kX.to(M.SlotStyle.TIME_INTRO_MAIN_GAME, this.container, { alpha: 1 }, 0, (() => { const t = this.Og.isSpinStarted(); this.Og.setSpinButtonInteractive(!0), this.setInteractivePanel(!t) }), null) } onDeactive() {} update(t) { this.Og.update(t), this.Py() } updateLostBalance() { this.Zg || this.Jg || (this.zg -= I.kc.getInst().totalBet, this.updateBalance(this.zg)) } updateLostBalanceBuyGame(t) { this.zg -= t, this.updateBalance(this.zg) } updateBalance(t) { return Se(this, null, (function*() { yield new Promise((i => { let n = ge.getInst() && ge.getInst().isActive() && ge.getInst().isTurboModeEnabled() ? M.Control.BALANCE_RUNNING_TIME / 2 : M.Control.BALANCE_RUNNING_TIME; t <= this.zg && (n = M.Control.BALANCE_RUNNING_TIME), this.Yg.tweenValue(this.zg, t, n, 0, null, (() => { this.$g.position.set(-this.Yg.getAnimateText().width, 0) }), (() => { this.$g.position.set(-this.Yg.getAnimateText().width, 0) }), !1, !0), this.zg = t, i() })) })) } getCurrentBalanceShow() { return this.zg } My() { "default" === n.ConfigManager.getInst().creditCurrencyConfig && (this.Qg = !this.Qg, i.JK.changeDisplayFormat(), this.qg.text = i.JK.currencyFormatAmount(0), this.Hg.text = i.JK.currencyFormatAmount(I.kc.getInst().totalBet, !0), this.Wg.text = i.JK.getCurrencyText(), this.Wg.position.set(-this.Hg.width, 0), this.$g.text = i.JK.getCurrencyText(), this.$g.position.set(-this.Yg.getAnimateText().width, 0), this.updateBalance(this.zg)) } isShowCreditValue() { return this.Qg } onSpinStopped(t) { !this.Og.isAutoSpin() && t && this.Ny(!0) } onSpinStarted() { this.Ny(!1) } onSpinSessionEnd() {} onAutoSpin() { this.Ny(!1) } updateBetAmount() { if (this.Hg.text = i.JK.currencyFormatAmount(I.kc.getInst().totalBet, !0), i.cQ.fitFontSizeByCharacter(this.Hg, this.Hg.text, [{ digits: 10, fontSize: 26, pos: this.Hg.position }, { digits: 9, fontSize: 28, pos: this.Hg.position }, { digits: 8, fontSize: 30, pos: this.Hg.position }, { digits: -1, fontSize: 40, pos: this.Hg.position }]), this.Yg) { this.Yg.getAnimateText().style.fontSize = this.Hg.style.fontSize } i.kX.to(100, this.Hg.scale, { x: 1.2, y: 1.2 }, 0, (() => { i.kX.to(100, this.Hg.scale, { x: 1, y: 1 }, 0, null, null) }), null); const t = Math.floor(.75 * this.Hg.style.fontSize); this.Wg.style.fontSize = t, this.Wg.position.set(-this.Hg.width, 0), this.$g.style.fontSize = t, this.$g.position.set(-this.Yg.getAnimateText().width, 0), this.updateCheckBetButton(), this.Og.checkDimSpinButton() } updateWinAmount(t, n = !1) { if (!t || t <= 0) { const t = i.b2.setInterval(50, (() => { this.ny || (i.b2.clearInterval(t), this.Jl = 0, this.qg.text = i.JK.currencyFormatAmount(0)) })) } else { if (n) this.qg.text = i.JK.currencyFormatAmount(this.Jl + t), this.ny = !1, this.Jl += t; else { const n = { winAmount: this.Jl }; i.kX.to(M.Control.WIN_AMOUNT_PANEL_RUNNING_TIME, n, { winAmount: this.Jl + t }, 0, (() => { this.ny = !1 }), (() => { this.qg.text = i.JK.currencyFormatAmount(n.winAmount), this.ny = !0 })), this.Jl += t } this.qg.text = i.JK.currencyFormatAmount(this.Jl), this.ny = !1 } } updateFeatureWinAmount(t) {} updateFreegameRemain(t) { t < 1 ? (this.Oy.visible = !1, this.Iy.visible = !0, this.iy.visible = !1) : (this.iy.text = t.toString(), this.Oy.visible = !0, this.Iy.visible = !1, this.iy.visible = !0) } getLastWinAmount() { return this.Jl } disableButtonSpin() { this.Og.disableButtonSpin() } switchSpinButtonToSpinStarted(t) { this.Og.switchToSpinStarted(t) } presetSpinButtonForFreeMinigame(t) { return Se(this, null, (function*() { return this.Og.presetFreeMinigame(t), this.Ry(!0) })) } hideSpinNumber(t) { this.Og.hideSpinNumber(t) } getSpinButton() { return this.Og } Ny(t) { this.Xg.setInteractable(t), this.jg.setInteractable(t), this.Dg.setInteractable(t), this.Vg.setInteractable(t), this.Hg.interactive = t, this.qg.interactive = t, this.Yg.interactive = t, Re.getInst().getPaylineInfo().setInteractableBuyFeature(t), Ts.isEnable = t, t && this.updateCheckBetButton() } isSpinPanelInteractable() { return this.Xg.getContainer().interactive } my(t) { this.Bg.setToggle(t), this.Og.setPassTutorialTurbo(), ge.getInst().turboModeOption(t) } Ty() { i.kX.to(M.SlotStyle.MENU_EXPAND_TIME, this.wy.position, { y: -this.kg }), i.kX.to(M.SlotStyle.MENU_EXPAND_TIME, this.uy, { alpha: 0 }), i.kX.to(M.SlotStyle.MENU_EXPAND_TIME, this.hy, { alpha: 0 }), this.Bg.getContainer().interactive = !1, this.Og.setSpinButtonInteractive(!1), this.setInteractivePanel(!1), this.wy.interactiveChildren = !0, n.AppState.pushState(n.AppState.State.Popup) } yy() { i.kX.to(M.SlotStyle.MENU_EXPAND_TIME, this.wy.position, { y: 2 * M.Menu.SPIN_PANEL_HEIGHT }), i.kX.to(M.SlotStyle.MENU_EXPAND_TIME, this.uy, { alpha: 1 }), i.kX.to(M.SlotStyle.MENU_EXPAND_TIME, this.hy, { alpha: 1 }), this.Bg.getContainer().interactive = !0, this.Og.setSpinButtonInteractive(!0), this.setInteractivePanel(!0), this.Xg.getContainer().interactive = !0, this.wy.interactiveChildren = !1, n.AppState.popState() } setInteractivePanel(t) { this.jg.getContainer().interactive = t, this.Dg.getContainer().interactive = t, this.Xg.getContainer().interactive = t, this.Vg.getContainer().interactive = t, this.Yg.interactive = t, this.Hg.interactive = t, this.qg.interactive = t, Re.getInst().getPaylineInfo().setInteractableBuyFeature(t), this.updateCheckBetButton(t) } updateSoundSetting(t) { this.gy.setToggle(t) } isMaxBet() { return !1 === I.kc.getInst().canIncreaseDenomination() } isMinBet() { return !1 === I.kc.getInst().canDecreaseDenomination() } showNotify(t, n = !1) { this.ly.text = t, window.clearTimeout(this.Ly), this.py.visible = !0, this.py.alpha = 1, this._y.visible = n, i.kX.to(100, this.py.scale, { x: 1.2, y: 1.2 }, 0, (() => { i.kX.to(100, this.py.scale, { x: 1, y: 1 }, 0, (() => {}), null) }), null), this.Ly = window.setTimeout((() => { i.kX.to(100, this.py, { alpha: 0 }, 0, (() => { this.py.visible = !1, this._y.visible = !1 }), null) }), 2500) } getNotifyContainer() { return this.py } updateCheckBetButton(t = !0) { if (!t) return this.jg.setInteractable(!1), void this.Dg.setInteractable(!1); this.isMaxBet() ? this.jg.setInteractable(!1) : this.jg.setInteractable(!0), this.isMinBet() ? this.Dg.setInteractable(!1) : this.Dg.setInteractable(!0) } Ry(t) { return Se(this, null, (function*() { return new Promise((i => { t ? this.oy.renderable ? i() : this.Cy(!1).then((() => { this.oy.renderable = !0, i() })) : (this.oy.renderable = !1, this.Cy(!0).then((() => { i() }))) })) })) } Cy(t) { return Se(this, null, (function*() { return new Promise((n => { t ? (this.hy.visible = !0, i.kX.to(500, this.hy, { alpha: 1 }, 0, (() => { n() }))) : i.kX.to(500, this.hy, { alpha: 0 }, 0, (() => { this.hy.visible = !1, n() })) })) })) } setShowFreeGameUI(t) { t ? (this.uy.visible = !1, this.hy.visible = !1, this.Hm.visible = !1, this.ey.visible = !0, this.Oy.visible = !0, this.Iy.visible = !1, this.iy.visible = !0, Re.getInst().getPaylineInfo().showUIFreegame(!0), this.Xg.getContainer().visible = !1) : (this.uy.visible = !0, this.hy.visible = !0, this.Hm.visible = !0, this.ey.visible = !1, Re.getInst().getPaylineInfo().showUIFreegame(!1), this.Xg.getContainer().visible = !0) } get position() { return this.container.position } isInFreeMinigame() { return this.Jg } isAutoSpin() { return this.Og.isAutoSpin() } activeWinCombine() {} Sy(t) { return t.toLocaleString("en-CA", { month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", hour12: !1, timeZone: "Asia/Kuala_Lumpur" }) + ` ${M.BE_BASE_TIME}` } Py() { this.Ey.text = this.Sy(new Date) } updateTnumValue() { this.Ay.text = I.kc.getInst().tnum ? I.kc.getInst().tnum.toString() : "" } } /*! * @pixi/filter-adjustment - v4.1.3 * Compiled Thu, 17 Jun 2021 19:33:56 UTC * * @pixi/filter-adjustment is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var Te = function(t, i) { return (Te = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i } || function(t, i) { for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]) })(t, i) }; var Me = function(t) { function i(i) { var n = t.call(this, "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}", "varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float gamma;\nuniform float contrast;\nuniform float saturation;\nuniform float brightness;\nuniform float red;\nuniform float green;\nuniform float blue;\nuniform float alpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (c.a > 0.0) {\n c.rgb /= c.a;\n\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\n rgb.r *= red;\n rgb.g *= green;\n rgb.b *= blue;\n c.rgb = rgb * brightness;\n\n c.rgb *= c.a;\n }\n\n gl_FragColor = c * alpha;\n}\n") || this; return n.gamma = 1, n.saturation = 1, n.contrast = 1, n.brightness = 1, n.red = 1, n.green = 1, n.blue = 1, n.alpha = 1, Object.assign(n, i), n } return function(t, i) { function n() { this.constructor = t } Te(t, i), t.prototype = null === i ? Object.create(i) : (n.prototype = i.prototype, new n) }(i, t), i.prototype.apply = function(t, i, n, s) { this.uniforms.gamma = Math.max(this.gamma, 1e-4), this.uniforms.saturation = this.saturation, this.uniforms.contrast = this.contrast, this.uniforms.brightness = this.brightness, this.uniforms.red = this.red, this.uniforms.green = this.green, this.uniforms.blue = this.blue, this.uniforms.alpha = this.alpha, t.applyFilter(this, i, n, s) }, i }(a.wn); class Oe extends u.W2 { constructor() { super(), this.adjustF = new Me({ brightness: 4, alpha: .5 }), this.Uy = 0, this.ky = 1, this.Fy = 2, this.By = 3, this.Dy = 500, this.op = [800, 300], this.jy = [400, 160], this.Gy = [400, 100], this.Wy = [300, 120], this.Hy = [300, 120], this.Xy = 4, this.Vy = [0, 1, 2], this.$y = [1, 2], this.Yy = 3, this.zy = !1, this.Ky = !0, this.qy = 0, this.Zy = null, this.Jy = [], this.Qy = 0, this.tE = 580, this.iE = -this.tE / 2, this.nE = 0, this.sE = null, this.eE = !1, this.rE = new Ms.zx({ background: new c.j(n.ResourceManager.getAtlasFrame("UI_multilanguage", "buy_feat_btn")) }).on("click", (() => { Gs.getInst().buyFeaturePopup.open() })), this.rE.getContainer().hitArea = new r.Ae(-170, -54, 340, 80), this.rE.getContainer().anchor.set(.5), this.rE.getContainer().position.y = -75, this.rE.getContainer().visible = !0, this.addChild(this.rE.getContainer()), this.im = new E.PY(n.ResourceManager.getSpine("msg")), this.im.position.y = -330, this.im.state.setAnimation(this.Uy, "t1", !0), this.addChild(this.im), this.hE = new u.W2; const t = this.im.skeleton.findSlotIndex("track_win_amt"), i = this.im.slotContainers[t]; this.dp = new p.Xz("x1", { fontName: M.Font.FONT_MULTIPLIER, fontSize: 20, align: "center" }), this.dp.anchor.set(.5), this.dp.scale.y = -1, this.dp.position.y = -20, this.dp.alpha = 0, this.dp.filters = [this.adjustF], this.dp.visible = !1, i.addChild(this.hE), this.oE = new p.Xz("", { fontName: M.Font.FONT_WIN, fontSize: 28, align: "left" }), this.oE.anchor.set(0, .5), this.oE.position.y = 8, this.oE.scale.y = -1, this.oE.visible = !1, this.hE.addChild(this.oE), this.uE = n.ResourceManager.getAtlasFrame("UI_multilanguage", "win"), this.aE = n.ResourceManager.getAtlasFrame("UI_multilanguage", "total-win"), this.lE = n.ResourceManager.getAtlasFrame("UI_multilanguage", "feature_win"), this.cE = new c.j(this.uE), this.cE.visible = !1, this.cE.anchor.set(0, .5), this.cE.position.y = 0, this.cE.scale.y = -1, this.hE.addChild(this.cE), this.qy = 0, this.Zy = new u.W2, this.Zy.name = "HintContainer"; for (let t = 0; t < this.Xy; ++t) { const i = new c.j(n.ResourceManager.getAtlasFrame("UI_multilanguage", `msg${t+1}`)); i.visible = !1, i.position.y += -12, this.Jy.push(i), this.Zy.addChild(i) } const s = new v.TC; s.beginFill(16777215, 1); const e = { x: this.iE, y: -50, w: this.tE, h: 80, r: 8 }; s.drawRoundedRect(e.x, e.y, e.w, e.h, e.r), s.endFill(), s.position.y = 0, this.Zy.addChild(s), this.Zy.mask = s, this.addChild(this.Zy) } enableUpdatePayline(t = !0) { this.Ky = t } isShowPayline() { return this.Ky } updatePayline(t, n = 0, e = !1, r = !1, h = 1) { if (!this.Ky) return; const o = n; if (o > 0) if (this.oE.text = i.JK.currencyFormatAmount(o), i.cQ.fitFontSizeByCharacter(this.oE, this.oE.text, [{ digits: 14, fontSize: 15, pos: this.oE.position }, { digits: 12, fontSize: 18, pos: this.oE.position }, { digits: 11, fontSize: 21, pos: this.oE.position }, { digits: -1, fontSize: 30, pos: this.oE.position }]), this.hideHint(), this.oE.visible = !0, this.nE = Date.now(), e) { const t = I.kc.getInst().totalBet; this.cE.visible = !0; const n = Re.getInst().isAutoSpining(); if (o > t * M.Control.LEVEL_BAR_PAYLINE[0] && !n) { const t = { r: 0 }; s.getInst().playSfx("SFX_PAYOUT_LOOP"), i.kX.to(M.Control.PAYLINE_TOTALWIN_COUNT_TIME, t, { r: o }, 0, (() => { s.getInst().isPlaying("SFX_PAYOUT_LOOP") && s.getInst().fade("SFX_PAYOUT_LOOP", "AUTO", 0, 500, !1), M.RuntimeData.isBackFromFreegame = !1 }), (() => { this.cE.texture = M.RuntimeData.isBackFromFreegame ? this.lE : this.aE; const n = this.cE.width; this.oE.text = `${i.JK.currencyFormatAmount(t.r)}`, this.oE.x = n + 5, this.hE.x = -(this.cE.width + this.oE.width) / 2 })) } else { s.getInst().playSfx("SFX_PAYOUT"), this.cE.texture = M.RuntimeData.isBackFromFreegame ? this.lE : this.aE; const t = this.cE.width; this.oE.text = `${i.JK.currencyFormatAmount(o)}`, this.oE.x = t + 5, this.hE.x = -(this.cE.width + this.oE.width) / 2, M.RuntimeData.isBackFromFreegame = !1 } this.updateBarLevel(o, !1, !0) } else if (r) { ge.getInst().getGameBoard().isTurboModeEnabled() || ge.getInst().getGameBoard().isFTRMode(); this.cE.visible = !1, this.oE.text = `${i.JK.currencyFormatAmount(o/h)}`, this.oE.x = 0, this.hE.x = -this.oE.width / 2, this.updateBarLevel(o, !0, !1), i.b2.setTimeout(460, (() => { this.cE.visible = !0, this.cE.texture = this.uE; const t = this.cE.width; this.oE.text = `${i.JK.currencyFormatAmount(o)}`, this.oE.x = t + 5, this.hE.x = -(this.cE.width + this.oE.width) / 2 })) } else { if (h > 1) { this.cE.visible = !0, this.cE.texture = this.uE; const t = this.cE.width; this.oE.text = i.JK.currencyFormatAmount(o / h), this.oE.x = t + 5, this.hE.x = -(this.cE.width + this.oE.width) / 2 } else { this.cE.visible = !0, this.cE.texture = this.uE; const t = this.cE.width; this.oE.text = `${i.JK.currencyFormatAmount(o)}`, this.oE.x = t + 5, this.hE.x = -(this.cE.width + this.oE.width) / 2 } this.updateBarLevel(o, !1, !1) } } showTotalWinNoEffect(t) { this.oE.text = `${M.Font.TOTAL_WIN_CHARACTER} ${i.JK.currencyFormatAmount(t)}`, this.nE = Date.now() } playTongThangCounting(t, n, s, e = !1) { this.hideHint(), this.oE.visible || (this.nE = Date.now(), this.oE.visible = !0, this.cE.visible = !0); const r = I.kc.getInst().totalBet; if (e || s || n < M.Control.PAYLINE_TOTALWIN_COUNT_CONDITION * r) { this.cE.texture = this.aE; const t = this.cE.width; this.oE.text = `${i.JK.currencyFormatAmount(n)}`, this.oE.x = t + 5, this.hE.x = -(this.cE.width + this.oE.width) / 2 } else if (n >= M.Control.PAYLINE_TOTALWIN_COUNT_CONDITION * r) { const s = { r: t }; i.kX.to(M.Control.PAYLINE_TOTALWIN_COUNT_TIME, s, { r: n }, 0, null, (() => { this.cE.texture = this.aE; const t = this.cE.width; this.oE.text = `${i.JK.currencyFormatAmount(s.r)}`, this.oE.x = t + 5, this.hE.x = -(this.cE.width + this.oE.width) / 2 })) } else { this.cE.texture = this.aE; const t = this.cE.width; this.oE.text = `${i.JK.currencyFormatAmount(n)}`, this.oE.x = t + 5, this.hE.x = -(this.cE.width + this.oE.width) / 2 } } getDurationAnimMultiply(t = !1) { const i = t ? 1 : 0; return this.op[i] + this.jy[i] + this.Wy[i] + Math.min(this.Gy[i], this.Hy[i]) } updateBarLevel(t, i = !1, n = !1) { if (t > 0) { const n = I.kc.getInst().totalBet; t > n * M.Control.LEVEL_BAR_PAYLINE[1] ? (this.qy = 2, this.fE(this.qy, i)) : t > n * M.Control.LEVEL_BAR_PAYLINE[0] ? (this.qy = 1, this.fE(this.qy, i)) : (this.qy = 0, this.fE(this.qy, i)) } else this.qy = -1, this.fE(this.qy) } resetHintIndex() { this.Qy = 0 } vE(t = !1) { if (!this.zy && !this.eE) { this.zy = !0, this.updateBarLevel(0); let n = this.Vy[this.Qy]; if (!1) for (; !this.$y.includes(n);) this.Qy++, this.Qy >= this.Vy.length && (this.Qy = 0), n = this.Vy[this.Qy]; if (this.Qy >= this.Vy.length && (this.Qy = 0), this.dE = this.Jy[this.Vy[this.Qy]], t ? this._E = i.b2.setTimeout(300, (() => { i.cQ.Rv(this.dE, 220) })) : i.cQ.Rv(this.dE, 100), this.dE.width > this.tE) { this.dE.position.x = this.iE, this.dE.anchor.set(0, .5); const t = this.dE.width / .1; i.kX.to(t, this.dE.position, { x: this.iE - this.dE.width - 50 }, M.Control.HINT_LONG_TEXT_DISPLAY_TIME, null, null), this.pE = i.b2.setTimeout(M.Control.HINT_LONG_TEXT_DISPLAY_TIME + t + M.Control.HINT_LONG_TEXT_WAIT_TO_NEXT_HINT, this.mE.bind(this)) } else this.dE.anchor.set(.5), this.pE = i.b2.setTimeout(M.Control.HINT_SHORT_TEXT_DISPLAY_TIME, this.mE.bind(this)); this.Qy++ } } hideHint() { i.b2.clearTimeout(this.pE), i.b2.clearTimeout(this._E), this.zy = !1; this.dE && this.dE.visible && i.cQ.Pv(this.dE, 50) } mE() { if (this.oE.visible) return; const t = this.dE && this.dE.visible; this.hideHint(), this.oE.visible || (this.zy = !1, this.vE(t)) } fE(t, n = !1) { switch (t) { case 0: this.im.state.timeScale = 1.5; let t = this.im.state.setAnimation(this.Uy, "t1_win", !1).animation.duration; t += this.im.state.addAnimation(this.Uy, "t1", !0, 0).animation.duration, i.b2.setTimeout(1e3 * t, (() => { this.im.state.timeScale = 1 })); break; case 1: this.im.state.timeScale = 1.5; let n = this.im.state.setAnimation(this.Uy, "t2_in", !1).animation.duration; n += this.im.state.addAnimation(this.Uy, "t2_win", !1, 0).animation.duration, this.im.state.addAnimation(this.Uy, "t2", !0, 0), i.b2.setTimeout(1e3 * n, (() => { this.im.state.timeScale = 1 })); break; case 2: this.im.state.timeScale = 1.5; let s = this.im.state.setAnimation(this.Uy, "t3_in", !1).animation.duration; s += this.im.state.addAnimation(this.Uy, "t3_win", !1, 0).animation.duration, this.im.state.addAnimation(this.Uy, "t3", !0, 0), i.b2.setTimeout(1e3 * s, (() => { this.im.state.timeScale = 1 })); break; default: this.im.state.clearTrack(this.Uy), this.im.skeleton.setToSetupPose(), this.im.state.setAnimation(this.Uy, "t1", !0) } } getInformationBar() { return new r.E9(0, 0) } showHint() { this.oE.visible = !1, this.cE.visible = !1, this.vE() } showHintNearWin() { if (this.hideHint(), this.eE = !0, this.dE = this.Jy[this.Yy], i.cQ.Rv(this.dE, 100), this.dE.width > this.tE) { this.dE.position.x = this.iE, this.dE.anchor.set(0, .5); const t = this.dE.width / .05; i.kX.to(t, this.dE.position, { x: this.iE - this.dE.width - 50 }, M.Control.HINT_LONG_TEXT_DISPLAY_TIME, null, null), this.pE = i.b2.setTimeout(M.Control.HINT_LONG_TEXT_DISPLAY_TIME + t + M.Control.HINT_LONG_TEXT_WAIT_TO_NEXT_HINT, this.mE.bind(this)) } else this.dE.anchor.set(.5) } hideHintNewWin() { this.eE && (i.cQ.Pv(this.dE, 50, (() => { this.showHint() })), this.eE = !1) } fadeOutWinText(t = 240) { if (0 === this.nE) return; const n = Date.now() - this.nE; if (this.nE = 0, this.oE.visible && 1 === this.oE.alpha) { const s = () => { i.cQ.Pv(this.oE, t, (() => { this.showHint() })), i.cQ.Pv(this.cE, t), this.sE = null }; if (this.sE && i.b2.clearTimeout(this.sE), n < this.Dy) { this.sE = i.b2.setTimeout(this.Dy - n, s.bind(this)) } else s() } else this.showHint() } showUIFreegame(t) { this.rE.getContainer().visible = !t } setInteractableBuyFeature(t) { this.rE.setInteractable(t) } } class Ie extends n.AutoUpdateContainer { constructor() { super(), this.wE = null, this.nm = null, this.gE = null, this.yE = null, this.EE = 0, this.jf = null } initSymbolInfo() { this.jf = new v.TC, this.jf.beginFill(0, .6); this.jf.drawRect(-n.AppConfig.BASE_SCREEN_WIDTH / 2, -M.GameBoard.SYMBOL_HEIGHT - 170, n.AppConfig.BASE_SCREEN_WIDTH, (M.GameBoard.NUMBER_SYMBOL_DISPLAYED_ON_REEL + .1) * M.GameBoard.SYMBOL_HEIGHT), this.addChild(this.jf), this.AE = new u.W2, this.gE = new d.ZT(n.ResourceManager.getTexture("symbol_info_bg"), 20, 20, 20, 20), this.gE.width = 2 * M.GameBoard.SYMBOL_WIDTH, this.gE.height = 1.05 * M.GameBoard.SYMBOL_HEIGHT, this.AE.addChild(this.gE), this.yE = new c.j(n.ResourceManager.getTexture("symbol_info_bg1")), this.AE.addChild(this.yE), this.EE = this.gE.width, this.TE = M.SymbolType.SymbolNull, this.gE.on("pointerup", this.onClick.bind(this)), this.yE.on("pointerup", this.onClick.bind(this)), this.gE.interactive = !0, this.yE.interactive = !0, this.gE.position.y = -this.gE.height / 2 - 1.5, this.yE.position.y = -this.yE.height / 2 - 4; const t = new m.pn({ fontFamily: "robotoregular", fontSize: 24, fontWeight: "bold", fill: "#fdf56f", dropShadow: !0, dropShadowColor: "#000000", dropShadowBlur: 2, dropShadowAngle: Math.PI / 6, dropShadowDistance: 2, wordWrap: !0, wordWrapWidth: 250, leading: 1.3, align: "center" }); this.ME = new m.xv("", t), this.ME.anchor.set(.5, .5), this.OE = this.ME.x + 10, this.AE.addChild(this.ME); this.IE = new p.Xz("5\n4\n3\n", { fontName: M.Font.FONT_SYMBOL_INFO_LEFT, fontSize: 28, align: "center" }), this.IE.letterSpacing = 0, this.IE.anchor.set(.8, .64), this.AE.addChild(this.IE), this.RE = new p.Xz("123", { fontName: M.Font.FONT_SYMBOL_INFO_RIGHT, fontSize: 28, align: "right" }), this.RE.anchor.set(.5, .85), this.AE.addChild(this.RE), this.nm = n.SymbolSpinePoolMgr.getInst().getSpineWithKey("symbol_effect"), this.nm.visible = !1, this.nm.state.setAnimation(0, oe.getCombineAnimName(M.SymbolType.SymbolNull), !0), this.nm.zIndex = 1, this.AE.addChild(this.nm), this.visible = !1, this.addChild(this.AE) } onClick() { this.AE.visible && this.hideSymbolInfo() } updateInfo(t = M.SymbolType.SymbolNull, i = !0) { this.setTextInfo(t, i), this.setAnimInfo(t) } setTextInfo(t, i = !0) { const s = M.GameBoard.SYMBOL_WIDTH / 2; if (t === M.SymbolType.SymbolWild || t === M.SymbolType.SymbolScatter || t === M.SymbolType.SymbolBonus) this.IE.visible = !1, this.RE.visible = !1, this.ME.visible = !0, this.gE.width = 1.4 * this.EE, this.gE.position.x = i ? -s - 10 : -2.6 * M.GameBoard.SYMBOL_WIDTH, this.gE.visible = !1, this.yE.visible = !0, this.yE.position.x = i ? -s - 4 : -2.57 * M.GameBoard.SYMBOL_WIDTH + 9, this.ME.text = n.Localization.getText("SYMBOL_INFO_" + t), this.ME.x = this.OE + (i ? 3 * M.GameBoard.SYMBOL_WIDTH / 2 - 20 : -3 * M.GameBoard.SYMBOL_WIDTH / 2); else { this.gE.visible = !0, this.yE.visible = !1, this.IE.visible = !0, this.RE.visible = !0, this.ME.visible = !1, this.gE.width = 1 * this.EE, this.gE.position.x = i ? -s - 2 : -.733 * this.EE; this.RE.text = `${M.PayTable[t][2]}\n${M.PayTable[t][1]}\n${M.PayTable[t][0]}`, this.RE.x = this.OE + (i ? 2 * s + s / 3 : -2 * s + s / 3) - (i ? 25 : 0), this.IE.x = this.OE + (i ? 2 * s - s / 2 : -2 * s - s / 2) - (i ? 20 : 0) } } setAnimInfo(t = M.SymbolType.SymbolNull) { if (!this.wE || this.TE !== t) { if (this.wE) { this.AE.removeChild(this.wE); const t = this.TE; n.SymbolSpinePoolMgr.getInst().returnSymbolSpine(t, this.wE), this.wE = null } this.TE = t; const i = this.TE; this.wE = n.SymbolSpinePoolMgr.getInst().getSymbolSpineByKey(i), this.wE.tint = 16777215, this.wE.position.set(0, 0), this.AE.addChild(this.wE), this.AE.sortChildren() } this.resetAnimTracks(), this.wE.visible = !0; try { oe.checkSymbolHaveIdleAnim(t) ? (this.wE.state.setAnimation(0, "active", !1), this.wE.state.addAnimation(0, "idle", !0, 0)) : this.wE.state.setAnimation(0, "active", !0) } catch (t) {} } showSymbolInfo(t, n = M.SymbolType.SymbolNull, s = !0) { this.updateInfo(n, s), this.AE.visible = !0; const e = this.toLocal(t); this.AE.position.set(e.x + 0, e.y), this.visible || (this.visible = !0, this.jf.alpha = 0, i.kX.to(M.SlotStyle.FADED_DIM_TIME, this.jf, { alpha: 1 }, 0, null, null)); try { this.nm.state.setAnimation(0, oe.getCombineAnimName(n, "explose"), !1), this.nm.state.addAnimation(0, oe.getCombineAnimName(n), !0, 0) } catch (t) {} } hideSymbolInfo() { this.AE.visible = !1, this.visible = !1, this.nm.visible = !1 } resetAnimTracks() { this.wE.state.clearTrack(1), this.wE.skeleton.setToSetupPose(), this.wE.visible = !1 } getSymbolType() { return this.TE } } const Ne = class extends Ms.EV { constructor() { super(), this.decoContainer = null, this.overlayBoardContainer = null, this.topNotifyContainer = null, this.PE = null, this.LE = !1, this.UE = !1, this.kE = null, this.FE = null, this.BE = null, this.bg = !1, this.decoContainer = new u.W2, this.decoContainer.name = " deco", this.popupContainer = new u.W2, this.overlayBoardContainer = new u.W2, this.topNotifyContainer = new n.AutoAlignContainer("TOP"), We.getInst().app.ticker.add(this.onUpdate, this) } static getInst() { return Ne.vu || (Ne.vu = new Ne, Ms.EV.uiMgr = Ne.vu), Ne.vu } initUIComponents() { this.kE = new Oe, this.kE.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, 1050), this.BE = new u.W2, this.BE.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, n.AppConfig.BASE_SCREEN_HEIGHT / 2), this.PE = new Ae, this.PE.container.x = n.AppConfig.BASE_SCREEN_WIDTH / 2, this.PE.container.y = n.AppConfig.BASE_SCREEN_HEIGHT - M.Menu.SPIN_PANEL_HEIGHT / 2, this.DE = new c.j(n.ResourceManager.getAtlasFrame("menu_popup_atlas", "menupopup_loading")), this.DE.renderable = !1, this.DE.anchor.set(.5), this.DE.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, n.AppConfig.BASE_SCREEN_HEIGHT / 2 - 70), this.popupContainer.addChild(this.DE), this.FE = new Ie, this.FE.initSymbolInfo(), this.FE.position.set(360, 745), i.zW.on(i.qM.SPIN_SESSION_END, this.onSpinEnded.bind(this)), i.zW.on(i.qM.SPIN_START, this.onSpinStarted.bind(this)), this.initNotifyPopup() } initNotifyPopup() { this.ly = new m.xv("", { fontFamily: "robotolight", fontSize: M.Menu.MENU_TXT_FONT_SIZE + 5, fill: [16777215] }), this.ly.anchor.set(.5), this.vy = new c.j(n.ResourceManager.getAtlasFrame("ui_atlas", "tool_tip")), this.vy.anchor.set(.5), this.py = new u.W2, this.py.addChild(this.vy), this.py.addChild(this.ly), this.py.position.set(0, 0), this.py.visible = !1, this.topNotifyContainer.addChild(this.py) } onUpdate(t) { this.LE && this.PE.update(t / h.X.TARGET_FPMS / 1e3), this.DE && (this.DE.rotation += .1) } activeSpinPanel() { if (!this.LE) { this.uiContainer.addChild(this.decoContainer), this.PE.onActive(), this.uiContainer.addChild(this.PE.container), this.LE = !0, this.uiContainer.addChild(this.kE), this.uiContainer.addChild(this.FE); const t = this.PE.getNotifyContainer(); t.position.set(this.PE.position.x, this.PE.position.y - 370), this.uiContainer.addChild(t), this.uiContainer.addChild(this.BE) } } deactiveSpinPanel() { this.LE && (this.uiContainer.removeChild(this.PE.container), this.PE.onDeactive(), this.LE = !1) } onSpinStarted() { this.bg = !0, this.FE.hideSymbolInfo() } onSpinEnded() { this.PE.onSpinSessionEnd(), this.bg = !1 } isSpinStart() { return this.bg } updateBalance(t) { this.PE.updateBalance(t), this.PE.getSpinButton().checkDimSpinButton() } updateLostBalance() { this.PE.updateLostBalance() } updateLostBalanceBuyGame(t) { this.PE.updateLostBalanceBuyGame(t) } updateBetAmount() { this.PE.updateBetAmount() } switchSpinButtonToSpinStarted(t) { this.PE.switchSpinButtonToSpinStarted(t) } presetSpinButtonForFreeMinigame(t) { return i = this, n = null, s = function*() { return this.PE.presetSpinButtonForFreeMinigame(t) }, new Promise(((t, e) => { var r = t => { try { o(s.next(t)) } catch (t) { e(t) } }, h = t => { try { o(s.throw(t)) } catch (t) { e(t) } }, o = i => i.done ? t(i.value) : Promise.resolve(i.value).then(r, h); o((s = s.apply(i, n)).next()) })); var i, n, s } setAutoSpinActive(t) { this.UE = t } isAutoSpinActive() { return this.UE } updateSoundSetting(t) { this.PE.updateSoundSetting(t) } updateWinAmount(t, i = !1, n = 1) { this.PE.updateWinAmount(t, i), this.kE.updatePayline({}, t, !1, n > 1, n) } resetPaylineBarLevel() { this.kE.updateBarLevel(0) } showNetworkLoading(t = !0) { this.DE.renderable = t } updateShowPayline(t, i = 0, n = !1, s = !1, e = 1) { this.kE.updatePayline(t, i, n, s, e) } setUpdateShowPayline(t) { this.kE.enableUpdatePayline(t) } isShowPayline() { return this.kE.isShowPayline() } showSymbolInfo(t, i) { if (this.bg || this.UE) return; const n = this.uiContainer.parent.toLocal(i); this.FE.showSymbolInfo(i, t, n.x < 3.2 * M.GameBoard.SYMBOL_WIDTH) } getPaylineInfo() { return this.kE } showHint() { this.kE.showHint() } hideHint() { this.kE.hideHint() } showHintNearWin() { this.kE.showHintNearWin() } hideHintNearWin() { this.kE.hideHintNewWin() } getSpinPanel() { return this.PE } makeTop(t) { this.uiContainer.removeChild(t), this.uiContainer.addChild(t) } showNotify(t, n = 2e3, s) { s && this.py.position.set(s.x, s.y), this.ly.text = t, window.clearTimeout(this.Ly), this.py.visible = !0, this.py.alpha = 1, i.kX.to(100, this.py.scale, { x: 1.2, y: 1.2 }, 0, (() => { i.kX.to(100, this.py.scale, { x: 1, y: 1 }, 0, (() => {}), null) }), null), this.Ly = window.setTimeout((() => { this.py.visible = !1 }), n) } isInFreegame() { return this.PE.isInFreeMinigame() } isAutoSpining() { return this.PE.isAutoSpin() } getCharacterLayer() { return this.BE } }; let Re = Ne; Re.vu = null; const Pe = class extends u.W2 { constructor() { super(...arguments), this.jE = [] } static getInst() { return Pe.vu || (Pe.vu = new Pe), Pe.vu } init() {} addScore(t, n) { n = this.toLocal(n); const s = new p.Xz("999", { fontName: M.Font.FONT_WAYS, fontSize: 40, align: "center" }); s.anchor.set(.5), s.position.x = n.x, s.position.y = n.y, s.text = i.cQ.shortFormatMoneyNumber(t), s.visible = !1, this.jE.push(s), this.addChild(s) } resetScoreList() { this.jE.forEach((t => { this.removeChild(t) })), this.jE = [] } playScoreAnim(t = 1e3, n = !1) { let s = Re.getInst().getPaylineInfo().getInformationBar(); s = this.toLocal(s), s.x = s.x, s.y = s.y, this.jE && this.jE.length > 0 && this.jE.forEach((e => { e.visible = !0; const r = n ? e.position : s; i.kX.to(250, e.position, { x: r.x, y: r.y }, t, (() => { e.visible = !1 })) })) } skipScoreAnimShow() { this.jE && this.jE.length > 0 && this.jE.forEach((t => { t.visible = !1 })) } }; let xe = Pe; xe.vu = null; const Le = ["spk1", "spk5"], Ce = ["spk2", "spk3", "spk4"], Ue = ["SFX_REEL_SPIN", "SFX_REEL_DROP", "SFX_REEL_STOP", "SFX_PAYLINE", "SFX_PAYOUT", "SFX_PAYOUT_LOOP", "SFX_BUY_FEATURE_ANI_CANCEL", "SFX_BUY_FEATURE_ANI_SPAWN", "SFX_BUY_FEATURE_ANI_START", "UI_BUTTON_BUY_FEATURE", "UI_BUTTON_BUY_FEATURE_CANCEL", "UI_BUTTON_BUY_FEATURE_START", "UI_BUTTON_FG_COLLECT", "UI_BUTTON_FG_START", "SFX_FG_CUTSCENE", "SFX_FG_CUTSCENE_AWAY", "SFX_FG_FINISH", "SFX_FG_TRIGGER_ALARM", "SFX_TOTAL_WIN", "SFX_SYMBOL_ELIMINATE", "SFX_SYMBOL_ELIMINATE_L1", "SFX_SYMBOL_ELIMINATE_L2", "SFX_SYMBOL_ELIMINATE_L3", "SFX_READYHEAD", "SFX_SYMBOL_RANDOM", "SFX_SYMBOL_RANDOM_STOP", "SFX_SYMBOL_SCATTER", "SFX_SYMBOL_WILD", "SFX_SYMBOL_WILD_EXPAND", "SFX_SYMBOL_WILD_EXPAND_ANI", "SFX_WINS_SERIES_TOTAL_WIN", "SFX_BUTTON_CLICK", "SFX_WILD_SYM", "SFX_NORMAL_WIN", "UI_BUTTON_START", "SFX_MULTIPLIER", "BGM_WINS_SERIES", "SFX_WINNING_INCREMENT", "SFX_WINS_SERIES_HIT_BIG_WIN", "SFX_WINS_SERIES_HIT_MEGA_WIN", "SFX_WINS_SERIES_HIT_SUP_MEGA_WIN", "SFX_WINS_SERIES_HIT_ULTRA_MEGA_WIN", "SFX_WINS_SERIES_PAYOUT_LOOP", "BGM_WINS_SERIES_END", "NORMAL_MUSIC", "FREEGAME_MUSIC", "VO_LIANG_BEI", "VO_LIU_BEI", "VO_SAN_BEI", "VO_SHI_BEI", "VO_SI_BEI", "VO_WU_BEI", "VO_KAISHILO", "VO_KEYIKANDAO", "VO_CAN_SONGSAUDILA", "VO_HAODAI", "VO_AHHA_QUANZHONG_MAN", "VO_AHHA_QUANZHONG_WOMAN", "VO_BA_WAN", "VO_BAIBAN", "VO_ER_TIAO", "VO_ER_TONG", "VO_FACAI", "VO_HONGZHONG", "VO_SAN_TONG", "VO_WU_TIAO", "VO_WU_TONG", "VO_BUHAOYISI", "VO_PENGLAIGEPENG", "VO_ZIMO", "VO_CAN_FENGWONG", "VO_CAN_PENGMIEGUAI", "VO_DAJIAXIAOXIN", "VO_WOYOUHULE", "VO_CAN_FAIDI", "VO_WANGDONG", "PHOENIX_FLY", "SFX_PHOENIX_PUZZLE", "SFX_RETRIGGER", "SFX_FG_WIN_ROLLUP_LOOP", "NONE"], ke = ["NORMAL_MUSIC", "FREEGAME_MUSIC"], Fe = [{ p: "spk1", s: "sfx_reel_start" }, { p: "spk1", s: "sfx_reel_drop" }, { p: "spk1", s: "sfx_reel_stop" }, { p: "spk1", s: "sfx_payline" }, { p: "spk1", s: "sfx_payout" }, { p: "spk1", s: "sfx_payout_loop" }, { p: "spk1", s: "sfx_buy_feature_ani_cancel" }, { p: "spk1", s: "sfx_buy_feature_ani_spawn" }, { p: "spk1", s: "sfx_buy_feature_ani_start" }, { p: "spk1", s: "ui_button_buy_feature" }, { p: "spk1", s: "ui_button_buy_feature_cancel" }, { p: "spk1", s: "ui_button_buy_feature_start" }, { p: "spk1", s: "ui_button_fg_collect" }, { p: "spk1", s: "ui_button_fg_start" }, { p: "spk1", s: "sfx_fg_cutscene" }, { p: "spk1", s: "sfx_fg_cutscene_away" }, { p: "spk1", s: "sfx_fg_finish" }, { p: "spk1", s: "sfx_fg_trigger_alarm" }, { p: "spk1", s: "sfx_total_win" }, { p: "spk1", s: "sfx_symbol_eliminate" }, { p: "spk1", s: "sfx_symbol_eliminate_L1" }, { p: "spk1", s: "sfx_symbol_eliminate_L2" }, { p: "spk1", s: "sfx_symbol_eliminate_L3" }, { p: "spk1", s: "sfx_readyhead" }, { p: "spk1", s: "sfx_symbol_random", l: 1 }, { p: "spk1", s: "sfx_symbol_random_stop" }, { p: "spk1", s: "sfx_symbol_scatter" }, { p: "spk1", s: "sfx_symbol_wild" }, { p: "spk1", s: "sfx_symbol_wild_expand" }, { p: "spk1", s: "sfx_symbol_wild_expand_ani" }, { p: "spk1", s: "sfx_wins_series_total_win" }, { p: "spk1", s: "sfx_button_click" }, { p: "spk1", s: "sfx_wild_sym" }, { p: "spk1", s: "sfx_normal_win" }, { p: "spk1", s: "ui_button_start" }, { p: "spk1", s: "sfx_multiplier" }, { p: "spk2", s: "bgm_wins_series" }, { p: "spk2", s: "sfx_winning_increment" }, { p: "spk2", s: "sfx_wins_series_hit_big_win" }, { p: "spk2", s: "sfx_wins_series_hit_mega_win" }, { p: "spk2", s: "sfx_wins_series_hit_sup_mega_win" }, { p: "spk2", s: "sfx_wins_series_hit_ultra_mega_win" }, { p: "spk2", s: "sfx_wins_series_payout_loop" }, { p: "spk2", s: "bgm_wins_series_end" }, { p: "spk3", s: "bgm_mg", v: .7, l: 1, m: 1 }, { p: "spk4", s: "bgm_fg", v: .7, l: 1, m: 1 }, { p: "spk5", s: "vo_liang_bei" }, { p: "spk5", s: "vo_liu_bei" }, { p: "spk5", s: "vo_san_bei" }, { p: "spk5", s: "vo_shi_bei" }, { p: "spk5", s: "vo_si_bei" }, { p: "spk5", s: "vo_wu_bei" }, { p: "spk5", s: "vo_kaishilo" }, { p: "spk5", s: "vo_keyikandao" }, { p: "spk5", s: "vo_can_songsaudila" }, { p: "spk5", s: "vo_haodai" }, { p: "spk5", s: "vo_ahha_quanzhong_man" }, { p: "spk5", s: "vo_ahha_quanzhong_woman" }, { p: "spk5", s: "vo_ba_wan" }, { p: "spk5", s: "vo_baiban" }, { p: "spk5", s: "vo_er_tiao" }, { p: "spk5", s: "vo_er_tong" }, { p: "spk5", s: "vo_facai" }, { p: "spk5", s: "vo_hongzhong" }, { p: "spk5", s: "vo_san_tong" }, { p: "spk5", s: "vo_wu_tiao" }, { p: "spk5", s: "vo_wu_tong" }, { p: "spk5", s: "vo_buhaoyisi" }, { p: "spk5", s: "vo_penglaigepeng" }, { p: "spk5", s: "vo_zimo" }, { p: "spk5", s: "vo_can_fengwong" }, { p: "spk5", s: "vo_can_pengmieguai" }, { p: "spk5", s: "vo_dajiaxiaoxin" }, { p: "spk5", s: "vo_woyouhule" }, { p: "spk5", s: "vo_can_faidi" }, { p: "spk5", s: "vo_wangdong" }, { p: "spk5", s: "phoenix_fly" }, { p: "spk5", s: "sfx_phoenix_puzzle" }, { p: "spk5", s: "sfx_retrigger" }, { p: "spk5", s: "sfx_fg_win_rollup_loop" }]; var Be = (t, i, n) => new Promise(((s, e) => { var r = t => { try { o(n.next(t)) } catch (t) { e(t) } }, h = t => { try { o(n.throw(t)) } catch (t) { e(t) } }, o = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, h); o((n = n.apply(t, i)).next()) })); const De = class extends n.LoadingSceneBase { constructor() { super(), this.FAKE_LOADING_SPEED = 400, this.TRACK_CENTER = 0, this.TRACK_ARROW_LEFT = 1, this.TRACK_ARROW_RIGHT = 2, this.TRACK_PAGE = 3, this.TRACK_DONT_CHECK = 4, this.GE = null, this.WE = null, this.a_ = null, this.HE = null, this.XE = 1, this.VE = !1, this.$E = !1, this.YE = !1, this.zE = !1, this.KE = !1, this.qE = !1, this.ZE = !1, this.JE = 0, this.Of = 0, this.QE = 0, this.tS = !1, this.iS = null, this.nS = !1 } static getInst() { return De.vu || (De.vu = new De, n.LoadingSceneBase.loadingScene = De.vu), De.vu } load(t) { this.sS().then((() => { null == t || t() })), this.eS || (this.eS = new c.j(n.ResourceManager.getTexture("splash-sprite")), this.eS.position.y = -n.AppConfig.MAX_CANVAS_MARGIN_Y, this.container.addChild(this.eS), this.HE = new u.W2, this.HE.position.y = n.AppConfig.MAX_CANVAS_MARGIN_Y, this.eS.addChild(this.HE), this.rS = (new v.TC).beginFill(16777215, 1).drawRect(-n.AppConfig.BASE_SCREEN_WIDTH / 2, -n.AppConfig.MAX_CANVAS_HEIGHT / 2, n.AppConfig.BASE_SCREEN_WIDTH, n.AppConfig.MAX_CANVAS_HEIGHT), this.rS.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, n.AppConfig.BASE_SCREEN_HEIGHT / 2), this.rS.visible = !1, this.container.addChild(this.rS)), i.zW.on(i.SI.BRAND_LOGO_HIDED, (() => { 100 === this.Of ? this.showIntro() : this.tS = !0 })), this.nS = "1" === i.cQ.getGameSetting("skilIntro") } active() { this.$E ? this.sg() : this.load(this.sg.bind(this)), n.AppState.pushState(n.AppState.State.Loading) } sg() { return Be(this, null, (function*() { yield n.ConfigManager.getInst().loadConfigs(), this.hS(), We.getInst().getLoader().onProgress.add(this.oS.bind(this)), We.getInst().getLoader().onError.add(this.uS.bind(this)), We.getInst().getLoader().onComplete.once(this.aS.bind(this)) })) } deactive() { n.AppState.clearStates(), i.b2.setTimeout(200, (() => { const t = { texture: !0, baseTexture: !0, children: !0 }; this.eS.destroy(t), this.a_.getContainer().destroy(t), this.HE.destroy(t), this.container.children.forEach((t => { t.destroy({ children: !0 }) })), n.ResourceManager.releaseResource("splash-sprite"), n.ResourceManager.releaseResource("splash-start") })) } onPause() {} onResume() {} onWSConnected() {} onWSError(t) { this.WE.container.renderable = !1 } onWSReconnect(t) {} update(t) { if (this.WE && this.tS) { this.QE = Math.min(Math.round(this.QE + 100 / (this.FAKE_LOADING_SPEED / (1e3 * t))), this.Of), this.WE.progress = this.QE, 100 === this.QE && (this.YE = !0, this.showIntro()) } this.YE && (this.WE.container.visible = !1, this.qE && this.zE ? this.ZE || (this.ZE = !0, M.Control.USE_TOUCH_SCREEN_TO_ENTER_GAME ? (this.GE.text = n.Localization.getText("TOUCH_TO_START"), this.lS(this.GE.scale)) : (this.a_.getContainer().visible = !0, this.GE.visible = !1, this.lS(this.a_.getContainer().scale))) : (this.a_.getContainer().visible = !1, this.GE.visible = !0), this.WE && this.WE.update(t)) } showIntro() { if (this.VE || this.nS) return; this.VE = !0, this.cS = new E.PY(n.ResourceManager.getSpine("intro")), this.cS.stateData.setMix("left_button_idle", "left_button_hover", .25), this.cS.stateData.setMix("left_button_hover", "left_button_press", .25), this.cS.stateData.setMix("right_button_idle", "right_button_hover", .25), this.cS.stateData.setMix("right_button_hover", "right_button_press", .25), this.cS.state.setAnimation(this.TRACK_CENTER, "bg", !0), this.cS.state.setAnimation(this.TRACK_PAGE, "page1", !0), this.cS.state.setAnimation(this.TRACK_ARROW_LEFT, "left_button_idle", !0), this.cS.state.setAnimation(this.TRACK_ARROW_RIGHT, "right_button_idle", !0), this.cS.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, n.AppConfig.BASE_SCREEN_HEIGHT / 2), this.HE.addChild(this.cS); const t = new c.j; t.position.set(50, 620), t.hitArea = new r.Ae(0, 0, 60, 120), t.interactive = !0, t.buttonMode = !0, t.on("pointerup", (() => { this.cS.state.setAnimation(this.TRACK_ARROW_LEFT, "left_button_press", !1), this.cS.state.addAnimation(this.TRACK_ARROW_LEFT, "left_button_idle", !1, 0), this.changePage() })), t.on("pointerover", (() => { this.cS.state.setAnimation(this.TRACK_ARROW_LEFT, "left_button_hover", !0) })), t.on("pointerdown", (() => { this.cS.state.setAnimation(this.TRACK_ARROW_LEFT, "left_button_hover", !0) })), t.on("pointerout", (() => { this.cS.state.setAnimation(this.TRACK_ARROW_LEFT, "left_button_idle", !0) })), this.HE.addChild(t); const s = new c.j; s.position.set(n.AppConfig.BASE_SCREEN_WIDTH - 50 - 60, 620), s.hitArea = new r.Ae(0, 0, 60, 120), s.interactive = !0, s.buttonMode = !0, s.on("pointerup", (() => { this.cS.state.setAnimation(this.TRACK_ARROW_RIGHT, "right_button_press", !1), this.cS.state.addAnimation(this.TRACK_ARROW_RIGHT, "right_button_idle", !1, 0), this.changePage() })), s.on("pointerover", (() => { this.cS.state.setAnimation(this.TRACK_ARROW_RIGHT, "right_button_hover", !0) })), s.on("pointerdown", (() => { this.cS.state.setAnimation(this.TRACK_ARROW_RIGHT, "right_button_hover", !0) })), s.on("pointerout", (() => { this.cS.state.setAnimation(this.TRACK_ARROW_RIGHT, "right_button_idle", !0) })), this.HE.addChild(s); const e = new c.j; e.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, 1390), e.hitArea = new r.Ae(-200, -20, 400, 40), e.interactive = !0, e.buttonMode = !0, e.on("pointertap", (() => { this.cS.state.setAnimation(this.TRACK_DONT_CHECK, this.nS ? "tick_off" : "tick_on", !0), this.nS = !this.nS, i.cQ.updateGameSetting("skilIntro", this.nS ? "1" : "0", 30) })), this.HE.addChild(e) } changePage() { 1 === this.XE ? (this.XE = 2, this.cS.state.setAnimation(this.TRACK_PAGE, "page2", !0)) : (this.XE = 1, this.cS.state.setAnimation(this.TRACK_PAGE, "page1", !0)) } destroy(t) { super.destroy(t), De.vu = null } getNumberOfErrors() { return this.JE } sS() { return Be(this, null, (function*() { return new Promise((t => { n.ResourceManager.loadLoadingResources().then((() => { n.ResourceManager.loadWebFonts().then((() => { const i = new m.pn({ fontFamily: "robotoregular", fontSize: 36, fontWeight: "bold", fill: ["#ffffff", "#feba29"], stroke: "#4a1850", strokeThickness: 5, dropShadow: !0, dropShadowColor: "#000000", dropShadowBlur: 4, dropShadowAngle: Math.PI / 6, dropShadowDistance: 6 }); this.GE = new m.xv(n.Localization.getText("CONNECTING_TO_SERVER"), i), this.GE.visible = !1, this.GE.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, .82 * n.AppConfig.BASE_SCREEN_HEIGHT), this.GE.anchor.set(.5, .5), this.container.addChild(this.GE), this.WE = new Ms.Ff, this.WE.reset(), this.WE.container.position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, .85 * n.AppConfig.BASE_SCREEN_HEIGHT), this.container.addChild(this.WE.container), this.a_ = new Ms.zx({ background: new c.j(n.ResourceManager.getTexture("splash-start")) }).on("click", (() => { this.enterTheGame() })), this.a_.getContainer().anchor.set(.5), this.a_.getContainer().position.set(n.AppConfig.BASE_SCREEN_WIDTH / 2, .87 * n.AppConfig.BASE_SCREEN_HEIGHT), this.a_.getContainer().visible = !1, this.container.addChild(this.a_.getContainer()); const s = new m.xv("202504250627", { fontFamily: "robotoregular", fontSize: 23, fontWeight: "normal", align: "right", fill: [13422802] }); s.anchor.set(0, 0), s.alpha = .8, s.position.set(30, 40); const e = new n.AutoAlignContainer("TOP", -(s.height + 5)); e.name = "GameInfo", e.addChild(s), this.fS = s; const r = n.Localization.getText("GAME_NAME"), h = new m.xv(r, { fontFamily: "robotoregular", fontSize: 20, fontWeight: "bold", align: "right", fill: [16777215] }); h.anchor.set(1, 0), h.position.set(n.AppConfig.BASE_SCREEN_WIDTH - 20, 50), e.addChild(h), this.iS = h, this.container.addChild(e), this.vS = e, t() })) })) })) })) } dS() { const t = i.cQ.parseURLParams(window.location.href), s = "PTS" == I.kc.getInst().loginInfo.acct.currency; (t && t.merchantCode && (String(t.merchantCode).toLowerCase().includes("test") || String(t.merchantCode).toLowerCase().includes("demo")) || s) && (this.iS.text += "\n" + n.Localization.getText("TXT_DEMO"), M.RuntimeData.isTestAcc = !0) } hS() { this.YE || (this.JE = 0, this.WE.progress = 0, s.getInst().init({ PreloadPacks: Le, InGamePacks: Ce, MusicIds: ke, SoundNames: Ue, RawConfigs: Fe, LoadConcurrency: 2 }), i.zW.on(i.fb.LOAD_AUDIO, ((t, i) => { "PreGame" === t && (i || (this.zE = !0, this._S(), s.getInst().loadSounds("InGame"))) })), n.ResourceManager.loadBundle("PreGame")) } enterTheGame() { this.GE.visible = !1, this.container.removeChild(this.a_.getContainer()), i.b2.setTimeout(100, (() => { s.getInst().onGameStart(), this.pS() })), s.getInst().checkResumeContext(), this.mS() } mS() { const t = n.ConfigManager.getInst().tournament; t.enable && (t.language = We.getInst().language, t.code = n.ConfigManager.getInst().gameCode, t.playerId = I.kc.getInst().loginInfo.acct.acctId, t.merchant = I.kc.getInst().loginInfo.acct.merchant, t.currency = "PTS" == I.kc.getInst().loginInfo.acct.currency ? "USD" : I.kc.getInst().loginInfo.acct.currency, Ts.init(t)) } pS() { s.getInst().playSfx("UI_BUTTON_START"), n.SceneManager.getInst().goToScene(n.SceneManager.getInst().gameScene), Re.getInst().popupContainer.addChildAt(this.vS, 0), this.fS.visible = !1 } bS() { return new Promise((t => { ks.useSmokeJoinGame ? (I.kc.getInst().mockLogin(ks.MockLoginData[0]), I.kc.getInst().rc = ks.MockSettingGameData[0], this.wS(), t()) : I.fL.getInst().connect(n.ConfigManager.getInst().wsBaseURL, n.ConfigManager.getInst().wsEncryption, this.gS.bind(this)).then((() => { I.kc.getInst().login().then((i => { I.kc.getInst().sessionExpired ? this.gS("MSG_CLOSE") : I.kc.getInst().requestGameSettings().then((i => { this.wS(), n.ConfigManager.getInst().isCheckShowDemo && this.dS(), t() })) })) })) })) } wS() { s.getInst().loadSetting(), this.qE = !0 } oS(t, i) { const n = Math.round(t.progress); this.Of = n, s.getInst().onLoadingProgress(n) } uS(t, i, n) { var s, e; t && (this.yS(t, i, n), this.JE++, (null == (s = Gs.getInst().loadingResourcePopup) ? void 0 : s.isOpenning()) && Gs.getInst().loadingResourcePopup.close(), (null == (e = Gs.getConfirmPopup()) ? void 0 : e.isOpenning()) || (this.WE.container.renderable = !1, this.gS("MSG_SOCKET_ERROR"))) } ES(t) { i.kX.to(500, t, { x: 1, y: 1 }, 0, (() => { this.lS(t) })) } lS(t) { i.kX.to(500, t, { x: 1.1, y: 1.1 }, 0, (() => { this.ES(t) })) } aS(t, i) { return Be(this, null, (function*() { var t; if (this.JE > 0) return void((null == (t = Gs.getConfirmPopup()) ? void 0 : t.isOpenning()) || (this.WE.container.renderable = !1, this.gS("MSG_SOCKET_ERROR"))); yield this.bS(), this.Of = 100; const i = n.SymbolSpinePoolMgr.getInst().getSymbolSpineByKey("11"), s = n.SymbolSpinePoolMgr.getInst().getSymbolSpineByKey("1"); this.container.addChild(i), this.container.addChild(s); const e = "idle"; i.position.x -= 200, s.position.x -= 200, i.state.setAnimation(0, e, !0), s.state.setAnimation(0, e, !0), Re.getInst().initUIComponents(), Gs.getInst().initializePopups(), ws(), this.YE = !0, this._S() })) } _S() { this.KE || this.YE && this.zE && (We.getInst().getLoader().onError.add(((t, i, n) => { t && this.yS(t, i, n, "InGame") })), We.getInst().getLoader().onLoad.add(this.SS.bind(this)), We.getInst().getLoader().onComplete.add(((t, i) => {})), i.b2.setTimeout(150, (() => { n.ResourceManager.loadBundle("InGame") })), this.KE = !0) } yS(t, i, n, s) { const e = "error" !== t.name.toLowerCase() ? `, ${t.name}` : ""; t.message.length > 0 && t.stack.includes(t.message) } SS(t, i) { var s; if (n.ResourceManager.Pu.length > 0) for (let t = 0; t < n.ResourceManager.Pu.length; ++t) { const e = n.ResourceManager.Pu[t], r = e.assets.find((t => t.name === i.name)); if (r) { r.data = null == (s = n.LoaderHelper.pu(i)) ? void 0 : s.asset; e.assets.findIndex((t => !t.data)) < 0 && (e.callback(e.assets), n.ResourceManager.Pu.splice(n.ResourceManager.Pu.indexOf(e), 1), --t) } } } gS(t = "MSG_SOCKET_ERROR") { Ts.isEnable = !1, Gs.getConfirmPopup().open(n.Localization.getText(t), n.Localization.getText("TXT_YES"), (() => { location.reload() })) } }; let je = De; je.vu = null; const Ge = class extends n.MainApp { constructor() { super(), this.AS = [], Ge.vu = this, n.SceneManager.getInst().loadingScene = je.getInst(), n.SceneManager.getInst().gameScene = ge.getInst(); const t = Re.getInst(), i = xe.getInst(); this.app.stage.addChild(n.SceneManager.getInst().container), this.app.stage.addChild(i), this.app.stage.addChild(t.uiContainer), this.app.stage.addChild(t.overlayBoardContainer), this.app.stage.addChild(t.popupContainer), this.app.stage.addChild(t.topNotifyContainer), n.MultiResolutionHandler.getInst().init(this.app.view, this.app.renderer, this.app.stage), this.AS.push(n.SceneManager.getInst(), s.getInst()), document.addEventListener("visibilitychange", (() => { const t = !document.hidden; this.AS.forEach((i => i.onVisibilityChange(t))), Gs.getInst().onVisibilityChange(t) })) } static getInst() { return Ge.vu } }; let We = Ge; We.vu = null, window.onload = function() { n.AppConfig.gameConfig = M, i.cQ.gameUtils = oe, new We } })(), __webpack_exports__ })()));